MSI 在升级安装时删除了所需的程序集,但在修复时将其替换
我遇到了一些与 MSI 安装升级相关的奇怪问题,也许有人可以帮助我:
我有两个 MSI,一个原始的和一个升级的:
- MSI 版本 1.0
- 包含要安装到 GAC 的 .NET 程序集 foo.dll
- foo.dll 在 MSI 文件系统 gui 中属于“Assembly”类型(而不是“Output”)。
- 微星2.0版
- 还包含 foo.dll(同一版本),以及一堆附加程序集。
- 我希望 MSI 2.0 完全取代 1.0,因此我将 RemovePerviousVersion 设置为 False。
现在是两个安装场景:
我运行 MSI 1.0。 Foo.dll 已正确安装到 GAC。然后我运行 MSI 2.0,Foo.dll 似乎已从 GAC 中删除,但其他程序集仍然存在。我不知道有什么办法。但是,如果我转到“添加/删除程序”并单击“修复”,Foo.dll 就会被放入。
从未安装 MSI 1.0,而我运行 MSI 2.0。正如预期的那样,Foo.dll(和其他程序集)在那里。
任何想法为什么 foo.dll 在升级过程中被删除?提前致谢!
-Ken
更新 经过一些刷新/重建后,它现在似乎可以工作了。但是,现在当我卸载 MSI 时,即使其属性“Permanent”设置为 false,它也不会删除 foo.dll。问题不大,但很高兴知道发生了什么。
I'm experiencing some weirdness related to an MSI installation upgrade, perhaps someone out there can help me:
I have two MSIs, an original and an upgrade:
- MSI version 1.0
- Contains a .NET assembly, foo.dll, to be installed to the GAC
- foo.dll is of type "Assembly" (not "Output") within the MSI file system gui.
- MSI version 2.0
- Also contains foo.dll (same version), plus a bunch additional assemblies.
- I would like MSI 2.0 to totally replace 1.0, so I set RemovePerviousVersion to False.
Now the two installation scenarios:
I run MSI 1.0. Foo.dll is installed to the GAC properly. I then run MSI 2.0 and Foo.dll seems to be removed from the GAC, but the additional assemblies are there. I have no idea way. However, if I go to Add/Remove programs and click "Repair," Foo.dll gets put in.
MSI 1.0 is never installed and I run MSI 2.0. Foo.dll (and the additional assemblies) is there, as expected.
Any ideas why the foo.dll gets removed during the upgrade?? Thanks in advance!
-Ken
UPDATE After some refreshing/rebuilding, it seems to work now. However, now it does not remove foo.dll when I uninstall the MSI, even though its property "Permanent" is set to false. Not as big of a problem, but it would be nice to know what was going on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了纠正这个奇怪的现象,我最终执行了以下操作:
这解决了我眼前的问题并纠正了我遇到的安装/卸载问题。唯一的问题是这是一个手动过程。下一步,以某种方式使其成为自动构建后事件的一部分。
To correct the weirdness, I ended up doing the following:
This solved my immediate problem and corrected the install/uninstall issues I was experiencing. The only problem is that this is a manual process. Next step, make this a part of an automatic post-build event somehow.