VS 2008 安装项目从 GAC 卸载问题

发布于 2024-11-17 06:31:55 字数 853 浏览 2 评论 0原文

我们有一个项目解决方案,将主要输出转储到 GAC。我们需要这样做,因为我们的软件是另一个应用程序的插件,可以安装在任何地方,并且可以同时安装多个版本。

我们在从 MSI 升级和卸载时遇到问题。我们遇到的问题会影响“RemovePreviousVersions”设置的双方。

  • 当RemovePreviousVersions=False时,它 要求用户卸载 手动应用程序。如果卸载程序确实可以正常工作,这对我们来说就没问题了。但是,卸载后会留下 DLL 徘徊在 GAC AND 中 安装下一个版本的 安装程序不会覆盖 DLL 自其版本号起就存在于 GAC 中 是一样的。

  • 当RemovePreviousVersions=True时, 安装更高的 MSI 版本 超出已安装的 应用程序不会覆盖 GAC 中的 DLL 可能是因为 DLL 版本相同或者因为卸载不起作用。我不确定我是否足够了解原因。

我们想要做的就是能够正常卸载,或者升级实际上正确删除以前的版本并安装新版本,而无需干预。我认为没有理由更改所有 DLL 版本。除了了解整个应用程序的版本之外,我们不太关心版本控制,我们可以通过设置安装项目的版本来做到这一点,仅此而已。

FWIW,我们无法使用 WIX,因为我们需要使用的一些第三方多部分 DLL 存在限制,这些 DLL 无法使用 WIX 轻松添加到 GAC,但使用 VS 安装项目可以完美工作。

编辑: 顺便说一句,通过资源管理器视图或使用 gacutil.exe /u 手动从 GAC 中删除文件效果非常好。但是,我认为我不应该将对 gacutil 的调用添加到我的安装项目中。我觉得它应该为我做。不过,我可能对 .NET 安装项目给予了太多的信任。

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 RemovePreviousVersions=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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

咆哮 2024-11-24 06:31:55

关于安装项目不从 GAC 卸载程序集:您是否检查过注册表,发现其中没有对它的挥之不去的引用

计算机\HKEY_CURRENT\USER\Software\Microsoft\Installer\Assemblies\Global

卸载后 ?我遇到了类似的问题,当我从注册表中手动删除该条目后,卸载随后会正确地从 GAC 中删除该程序集。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文