Thanks all for the info.

 

I guess the problem for me is that if the a DLL cannot be gac’d because of the same version, I would expect the setup to fail instead of finish without error.

 

That is especially a problem to me because I also “ngen” the DLL in the same <File> element in WiX (see my first email below).  When the DLL couldn’t be put in GAC, the DLL didn’t get ngen’d neither, but the setup succeeded.  Later when trying to uninstall the product, setup failed because ngen could not uninstall the DLL.  And now the product cannot be uninstalled anymore….

 

I am wondering if setup should fail in the first place when it cannot put the DLL in GAC.  i.e. Netfx extension that puts DLL in GAC should fail when it cannot put DLL in GAC.

 

Thanks,

Frank

 

From: Mike Dimmick [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 23, 2006 8:08 AM
To: Wilson, Phil; Frank Tse; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] how to enforce assembly to be gac'd even when thereisalready a copy in the gac

 

It doesn't need to be higher, just different.

 

You should always change your assembly version number when modifying any assembly that goes in the GAC. Otherwise the Framework will simply ignore your change, whether you use MSI or gacutil. It doesn't check the file version attributes, only the assembly version.

 

If you want to redirect old clients to the new assembly, you need to use publisher policy, or use .exe.config files on the programs to be redirected. The former is the proper way to do it as a component author.

 

--

Mike Dimmick

 


From: [EMAIL PROTECTED] on behalf of Wilson, Phil
Sent: Fri 22/09/2006 20:32
To: Frank Tse; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] how to enforce assembly to be gac'd even when thereisalready a copy in the gac

That needs the FileVersion Name-Value pair to be in the MsiAssemblyName data, and to state the obvious the file version must be higher than the existing version in the GAC.

Phil Wilson


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Frank Tse
Sent: Friday, September 22, 2006 12:10 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] how to enforce assembly to be gac'd even when there isalready a copy in the gac

Hi,

 

I am using the File element to put assembly in GAC and using Netfx extension to put the assembly in GAC .  A scenario is that an older version of assembly might already be in GAC (done manually by user).  Right now when it is the case, the setup does not put the assembly within the setup into GAC.  On the other hand, setup does not report any errors.

 

<File Id='DLLInGACAndNgen' Name='MyAssembly.dll' DiskId='1'

      Source='MyAssembly.dll' Vital='yes' Assembly='.net' KeyPath='yes'>

  <netfx:NativeImage Id="Ngen" Priority="0"/>

</File>

 

I would like to make my setup to be robust and want it to install the assembly into the GAC to override the old version, is there any way to enforce the File element to always GAC the assembly even if it is already in GAC?

 

Thanks,

Frank

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to