473,671 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global Assembly Cache - Installation

We don't use the Microsoft Windows Installer 2.0 for our setup packages.
Instead, we use InnoSetup which is much easier to use and learn and more
flexible (that I have found). The only part that is making me frustrated is
I can't seem to write an installer that will (a) install into the global
assembly cache and (b) throw an exception if the install failed.

We can't use GACUTIL to install into the gac because GACUTIL is not
redistributable . So I wrote a small app that installs into the GAC using
the System.Enterpri seServices.Inte rnal.Publish class method GacInstall.
This works very well for (a). For (b) though, it doesn't. If for some
reason or another GacInstall fails to install the assembly, no exception is
raised, and there are no return values (since it's 'void'). So my app
returns success even though the actual assembly didn't get installed into
the GAC correctly.

Unless there is another way out there, I will need to perform all of the
checks / requirements myself in this gac installer executable prior to
calling GacInstall. Does anyone out there know of all of the checks and
requirements for a GacInstall to be successful? Here are a few I know of
currently:

1.) Assembly path must exists (umm, yeah, no brainer here).
2.) Assembly must be signed with a strong-name.

Thanks in advance :)

Mythran
Aug 18 '06 #1
1 3387
Have you tried using the supported GAC APIs?

http://msdn2.microsoft.com/en-us/library/ms230575.aspx
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Aug 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
504
by: Simon Wallis | last post by:
I know the general purpose for the GAC is to share a component among many applications. But even when you add something to the GAC, you still have to manually create a reference to the DLL in your project (right?). So what have I gained by adding it to the GAC?
3
2492
by: RickN | last post by:
We have a C# remoting application that runs thru the web. Assemblies appear to be loaded from the download cache. Is there any way to have them automatically copied to the GAC and be loaded from there: for performance reasons and to be applicable machine wide. We'd also like to be able to use an installation package to pre-load all the dll's and don't see how an installation program can pre-loaded them into the download cache. Thanks,...
3
1517
by: DDE | last post by:
Hi everybody, I developed an assembly common to all my Web Services, so I registered it and put it in the Global Assembly Cache. Now, I modified this assembly, but cannot succed to have this new assembly used by my Web Services. Whatever I do, the old assembly is still used!! I try to unregister it, put the new version in the assembly cache nothing works. I also repplaced the dll fil in :\WINNT\Microsoft.NET\Framework\v1.1.4322 , same...
7
960
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted c:\inetpub\wwwroot and rebooted before reinstalling. I created a new virtual directory from within IIS (e.g. MyWebTest). Then I tried to create a new Visual C# ASP.NET Web Application pointing to the location http://localhost/MyWebTest. I get...
11
3121
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the current entries for that page, and adds a new entry with some information regarding the current...
0
1000
by: John Wallace | last post by:
Hi, I have an initial build of an ASP.NET/C# application (based around a "custom control" with some supporting webforms) that contains the usual mix of: 1) ASP files 2) A single DLL (containing all the classes and code-behind I believe) 3) A supporting folder structure 4) Some data/config files used by the app.
3
1552
by: Jerry Morton | last post by:
Hi, My ASP.NET application will be installed on multiple web sites on one server. This means that the application DLL will be loaded once for each installation - which seems inefficient. If I install the DLL in the Global Assembly Cache, I know it only exists in one place on disk but does it also mean it is only loaded in memory ONCE on the server, with each installation using the same in-memory copy? Are there any security issues or...
1
1383
by: Ray | last post by:
Dear all, Now, I am using Global Assembly Cache to share assembly between server and clients. However, it seems that the server and clients use individual Global Assembly Cache. For example, the assembly is placed in U drive, I have to use the Global Assembly Cache Tool in the client PC to add the assembly to the Global Assembly Cache of the client PC manually. Should I set something in the Global Assembly Cache Tool in the client PC in...
6
2743
by: Piotrekk | last post by:
Hi In my solution I have two projects. First is Library project. The second project uses this library ( dll ). I am registering this assembly in global assembly cache ( by .net configuration tool ). Key pair is generated for the assembly using VS2005 ( I also use VS to sign my assembly using this keypair ) Everything works fine. I am adding reference to created dll, on the second project.
0
8474
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8392
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8912
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8669
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.