检测较新安装的版本问题
我正在使用 vs 2010,并且我生成了一个安装文件,我确实有RemovePreviousVersion true和DetectNewerInstalledVersion true,一开始我在删除以前的版本时遇到了问题,但是在MSI文件中进行了黑客攻击,它正在工作,如果我尝试安装一个安装文件,如果我的机器上已经安装了更高版本的安装文件,它将不会被检测到并且将单独安装。我不知道为什么它不起作用,是因为旧版本的安装文件是由 VS2008 创建的吗?并且没有检测NewerinstalledVersion true的选项。 谁将检查较新的版本,旧的安装版本或较新的版本将阻止它。 感谢您提前提供的帮助 日本人
I'm using vs 2010, and i generate a setup file, i do have RemovePreviousVersion true and DetectNewerInstalledVersion true, at the start i had problem to remove previous version but with a hack in the MSI file it is working, not if I try to install a setup file where I have a higher one already installed on my machine, it won't be detected and will be installed separately. I'm not sure why it is not working, is it because the older version setup file was created by VS2008 ?? and didnt have the option of detectingNewerinstalledVersion true.
who will check for the newer version the older setup version or the newer version will prevent it.
thank you for you help in advance
Jp
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了使两个安装项目被视为相同的应用程序,它们应该具有不同的产品代码、相同的升级代码和不同的版本号。
从您的问题中很难判断这是否会影响您,但 Visual Studio 2010 安装项目处理“升级”安装的方式存在严重问题。如果旧设置中的程序集与新设置中的程序集具有相同的 AssemblyFileVersionAttribute,则安装程序会假定该文件未更改,并且不会将其替换为新文件。
此问题的一种可能的解决方法是将
[ProductVersion]
包含在您的安装目录中。In order for two setup projects to be considered the same application they should have different product codes, identical upgrade codes, and different version numbers.
It's hard to tell from your question if this affects you, but there is a serious issue in the way Visual Studio 2010 setup projects handle "upgrade" installations. If an assembly in the older setup has the same AssemblyFileVersionAttribute as the one in the newer setup, the installer assumes the file has not changed and will not replace it with the newer file.
One possible workaround for this problem is to include the
[ProductVersion]
in your installation directory.