Adding assemblies to the GAC

Posts   
 
    
wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 05-Oct-2005 01:37:50   

Hi.

I need to add 2 libraries to the GAC by means of the installer wizard that comes with .Net.

I know how to add a assembly to the gac by means of the cmd prompt.

gacutil /i AssemblyFileName.dll 

But how do you do this with the install wizard?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 05-Oct-2005 11:05:10   

shell out to the prompt and do it that way. THe installer (MSI) contains a bug where it can make assemblies unremovable from the GAC due to inappropriately installed counters.

Frans Bouma | Lead developer LLBLGen Pro
wayne avatar
wayne
User
Posts: 611
Joined: 07-Apr-2004
# Posted on: 05-Oct-2005 11:34:28   

Thanks for this information - me not kow this- Always good to have friends in low places. wink

jtgooding
User
Posts: 126
Joined: 26-Apr-2004
# Posted on: 05-Oct-2005 14:47:30   

We wrote our own installer because all our desktops have limited access, i.e. they can't actually install, change or even breath without permissions, so we wrote our own install process that allows us to raise our permission level during the install, to gac from code:

        public static void GACFile(string fileName)
        {
            System.EnterpriseServices.Internal.Publish pu = new System.EnterpriseServices.Internal.Publish();
            pu.GacInstall(fileName);

        }

John