Uninstall assemblies for .NET 2.0

Got a problem you cannot solve? Try here.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

You can simply use the native .NET tools, called by Run Program, to unregister the assembly. If you do this after Apply Uninstall, and there are no more remaining clients for the assembly ("unpinned"), it will be removed. Otherwise the native .NET tools will not remove the assembly.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Post by alma88 »

Yes, I will try doing that myself, thanks for the suggestion.

Several months ago there had been similar discussions on the Wise and InstallShield forums. Both companies implemented this and their products now properly remove assemblies from the GAC. For us .NET component developers it is quite important that the install/uninstall basics work as expected.

Would I be asking too much if I requested a fix for this issue?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Technically, this won't be a fix. It will be a custom action for doing something MSI cannot do on its own.

The Wise/IS solutions, our custom DLL, and the Run Proyram command thus all amount to doing the same thing.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Post by alma88 »

Maybe I failed to make clear what I am looking for... my mistake. Let me have another shot at convincing you about the importance and urgency of this issue.

1. Try the following Visual Studio 2005 Setup Wizard project. It is very simple, all it does is install an assembly in the GAC. Upon uninstall, the assembly is removed from the GAC. Same behavior as the InstallShield and Wise installers, only this time it's got the "official" stamp on it since it's by MS.

2. In http://msdn2.microsoft.com/en-us/librar ... S.80).aspx, it states that "The Installer pins the assembly for the first Windows Installer client and unpins the assembly when the last Windows Installer client is removed. The file is then deleted from the global assembly cache".

The removal of assemblies from the GAC once they are not referenced any more is part of the very basic functionality that we, as .NET developers, expect from an installer. Leaving the assemblies in the GAC after an uninstall is, IMHO, an incomplete job.

Can you please, pretty please (should I drop on my knees and beg?) urgently enable IA to behave as the MS/InstallShield/Wise installers do?

File Attached:

Setup1.zip
ricardo.schiavo
Posts: 2
Joined: Thu Sep 06, 2007 8:37 am

Post by ricardo.schiavo »

MichaelNesmith wrote:You can simply use the native .NET tools, called by Run Program, to unregister the assembly. If you do this after Apply Uninstall, and there are no more remaining clients for the assembly ("unpinned"), it will be removed. Otherwise the native .NET tools will not remove the assembly.
Which tool are you suggesting? installutil.exe? Because I won't have gacutil.exe available in the customer machine...

Also, where can I get the dll you developed to remove the assembly from the GAC? I'm using IA Studio 6.5

Thanks
Ricardo Schiavo
[email protected]
GlenG
Posts: 10
Joined: Fri Dec 29, 2006 8:38 am

Post by GlenG »

Check out help for the 'Remove Assemblies' command that has been added since this thread started back in 2006.
You don't need to call installutil.exe anymore.
ricardo.schiavo
Posts: 2
Joined: Thu Sep 06, 2007 8:37 am

Post by ricardo.schiavo »

GlenG wrote:Check out help for the 'Remove Assemblies' command that has been added since this thread started back in 2006.
You don't need to call installutil.exe anymore.
The problem is I'm using IA 6.5, and it was added at 6.6...
Ricardo Schiavo
[email protected]
Post Reply