Force MSI to overwrite assemblies on installation

一曲冷凌霜 提交于 2019-12-13 00:45:40

问题


Merry Christmas, StackOverflowians!

I started out distributing my .NET GAC-located program using Inno Setup, but due to its various shortcomings, I want to switch over to MSI for the next version. Unfortunately, it seems like this is going to be a major hassle for my existing users... Of course, I'm going to have to insist that my users manually uninstall the previous version before installing the new one. But it seems like even if the previous version is completely uninstalled, it's still problematic.

I don't know if it's something I misconfigured, or if Inno Setup is just stupid this way, but it seems like Inno does not fully remove the assemblies. The result of this is that when I try to run my MSI installer, I see the following in the log, even after uninstallation: skipping installation of assembly component: {guid} since the assembly already exists

So what do I do here? Is there any way I can force MSI to overwrite the assemblies even if they already exist?


回答1:


Build your DLL's with the same strong name ( AssemblyVersion ) but with a higher File Version ( AssemblyFileVersion ). Be careful that your classes are 100% backwards compatible as the old DLL will be replaced.



来源:https://stackoverflow.com/questions/4532280/force-msi-to-overwrite-assemblies-on-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!