Visual Studio 设置不会卸载以前版本的构建 [英] Visual Studio Set-Up Doesn't uninstall previous version of the build
问题描述
我需要不断发布一个新的可执行文件并进行修改以发送给最终用户.设置项目属性设置为
I need to constantly release a new executable with modifications to send to the end user. The Set-UP Projects Properties are set to
RemovePreviousVersion = True
DetectNewerInstalledVersion = True
当我发布一个新版本时,我会增加版本并更改产品代码.
When I release a new build, I increment the Version AND change the Product Code.
(因为我使用的是 Visual Studio 2010 - 当您增加版本时,它会自动更改产品代码,但我也尝试手动更改它).
(Since I am using Visual Studio 2010 - when you increment the Version it automatically changes the product code, but I've tried to change it manually also).
构建完成后 - 之前的版本不会卸载.
When the build is done - the previous version doesn't uninstall.
设置如下:
经过更多研究,我发现项目的 fileVersion 也需要增加.我已经在 AssemblyInfo.cs 中这样做了
After some more research I've found that fileVersion of the project also needs to be increased. I've done so in the AssemblyInfo.cs
[assembly: AssemblyVersion("0.0.0.2")]
[assembly: AssemblyFileVersion("0.0.0.2")]
两个版本都是 0.0.0.1 .重建后 - 同样的问题.
关于如何获得这项工作的任何想法?
Any ideas on how to get this work?
推荐答案
我也遇到过这个问题.我发现更改必须大于修订号的更改.至少它需要是构建.
I have run into this also. What I found is the change has to be something greater than a change of the Revision Number. At the Minimum it needs to be the Build.
主要版本.次要版本.内部版本号.修订
Major Version.Minor Version.Build Number.Revision
所以在你的情况下:
[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
这篇关于Visual Studio 设置不会卸载以前版本的构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!