all groups > visual studio .net setup > march 2005 >
You're in the

visual studio .net setup

group:

Problem with RemovePreviousVersions and GAC


Problem with RemovePreviousVersions and GAC Zdenek Drlik
3/24/2005 2:26:36 PM
visual studio .net setup:
Hello,
I am developing installer project in Visual Studio 2003 for my
components and I have a problem with upgrading assemblies in GAC. I need
upgrading these assemblies with newer ones (AssemblyVersion is the same,
but AssemblyFileVersion is different) and I wanted to do so with
installer. I set up RemovePreviousVersions to True and increase
installer Version, but after running this installer package on machine,
old assemblies from GAC are deleted, newer ones aren'nt installed there.
I must run installer package again, select Repair and after that I have
installed newer assemblies.
Is it a bug in Visual Studio installer package, or I am missing
something? If it is a bug, does any workaround or any patch to VS or
something else exist to solve this problem?
Thanks,

Re: Problem with RemovePreviousVersions and GAC gyurisc
3/25/2005 12:00:00 AM
Hello,

Can you try to edit your msi with this tool

http://www.microsoft.com/downloads/details.aspx?FamilyID=105dfc41-801e-4441-aa75-7696d794f109&displaylang=en

You need the tall called orca, and move the RemoveExistingProduct before
Costinitialize in the InstallExecuteSequence table by changing the sequence
numbers. It may help but the last time that I had a problem like this, the
solution was this ;-)

Cris
[quoted text, click to view]

Re: Problem with RemovePreviousVersions and GAC Zdenek Drlik
3/25/2005 12:00:00 AM
[quoted text, click to view]

Hello,
this trick helps solve my problem, thanks. ;-)

Re: Problem with RemovePreviousVersions and GAC Phil Wilson
3/26/2005 10:07:47 AM
Something to watch out for with that solution is that you've taken
RemoveExistingProducts out of the audited section of the install. So you can
get a situation where you start the install, it removes the existing
product, then starts installing the new product but you have a problem and
it rolls back. It will not roll back the RemoveExistingProducts, so you are
now left with neither old nor new products installed.

Although it's true that a manually forced repair will install the assembly
into the GAC, the automatic repair also does. If you actually run the app
that uses that GAC assembly, it just repairs automatically - that's my
experience of this.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]

AddThis Social Bookmark Button