VS 2008 Setup Project Uninstall from GAC issue
We have a solution with projects which dumps the primary output to the GAC. We need to do this because our software is a plugin for another application which may be installed anywhere and which may have multiple versions installed simultaneously.
We're having problems with upgrading and uninstalling from our MSI. The problem we're running into affects us on both sides of the RemovePreviousVersions setting.
When RemovePreviou开发者_运维技巧sVersions=False, it requires the user to uninstall the app manually. This would be fine with us if the uninstaller would actually work properly. However, uninstalling leaves the DLLs lingering in the GAC AND installing the next version of the installer doesn't overwrite the DLLs in the GAC since their version numbers are the same.
When RemovePreviousVersions=True, installing a later MSI version overtop of the already installed application does not overwrite the DLLs in the GAC presumably because the DLL versions are the same OR because the uninstall doesn't work. I'm not sure I know enough to know which is the reason.
All we want to do is to either be able to have an uninstall work properly OR an upgrade actually RemovePreviousVersions properly and install the new version without intervention. I don't see a reason to change all my DLL versions. We don't care about versioning too much other than to know what version of the overall app their on and we can do this with setting the version of the Setup project and that's all.
FWIW, we can't use WIX because there are limitations with some of the third party multipart DLLs we need to use which cannot be easily added to the GAC using WIX but work perfectly using the VS Setup project.
EDIT: By the way, removing the files from the GAC manually through the Explorer view or using gacutil.exe /u works perfectly. However, I don't think I should add a call to gacutil to my setup project. I feel like it should do it for me. Though, I could be giving the .NET Setup project too much credit.
Concerning the setup project not uninstalling the assembly from the GAC: Have you checked the registry that there isn't a lingering reference to it in
Computer\HKEY_CURRENT\USER\Software\Microsoft\Installer\Assemblies\Global
after uninstalling? I had a similar issue, and once I removed the entry manually from the registry, the uninstall subsequently removed the assembly from the GAC correctly.
精彩评论