简体   繁体   English

从GAC卸载VS 2008安装项目

[英]VS 2008 Setup Project Uninstall from GAC issue

We have a solution with projects which dumps the primary output to the GAC. 我们有一个项目解决方案,可以将主要输出转储到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. 我们在从MSI升级和卸载时遇到问题。 The problem we're running into affects us on both sides of the RemovePreviousVersions setting. 我们遇到的问题影响着RemovePreviousVersions设置的两面。

  • When RemovePreviousVersions=False, it requires the user to uninstall the app manually. 当RemovePreviousVersions = False时,它要求用户手动卸载应用程序。 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. 但是,卸载会使DLL滞留在GAC中,而安装下一版本的安装程序并不会覆盖GAC中的DLL,因为它们的版本号相同。

  • 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. 如果RemovePreviousVersions = True,则在已安装的应用程序之上安装更高版本的MSI版本不会覆盖GAC中的DLL,这大概是因为DLL版本相同或因为卸载无效。 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. 我们要做的就是要么能够正常进行卸载,要么实际上可以进行升级,从而正确地删除PreviousVersions并在没有干预的情况下安装新版本。 I don't see a reason to change all my DLL versions. 我没有理由更改所有DLL版本。 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. 除了知道整个应用程序的版本外,我们只关心版本控制,我们可以通过设置Setup项目的版本来完成。

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. FWIW,我们不能使用WIX,因为我们需要使用某些第三方多部分DLL的局限性,使用WIX不能轻易将它们添加到GAC中,但是使用VS Setup项目可以完美地工作。

EDIT: By the way, removing the files from the GAC manually through the Explorer view or using gacutil.exe /u works perfectly. 编辑:顺便说一句,通过浏览器视图或使用gacutil.exe / u从GAC手动删除文件非常有效。 However, I don't think I should add a call to gacutil to my setup project. 但是,我不认为应该在我的安装项目中添加对gacutil的调用。 I feel like it should do it for me. 我觉得应该为我做。 Though, I could be giving the .NET Setup project too much credit. 虽然,我可能会给.NET安装项目太多的荣誉。

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 关于未从GAC卸载程序集的安装项目:您是否检查过注册表,在其中没有对它的持久引用?

Computer\\HKEY_CURRENT\\USER\\Software\\Microsoft\\Installer\\Assemblies\\Global 计算机\\ HKEY_CURRENT \\ USER \\软件\\ 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. 我遇到了类似的问题,一旦我从注册表中手动删除了该条目,卸载随后便会正确地从GAC中删除了该程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM