2017-03-28 22 views
0

好时机,如何使用MSBuild.exe更改ClickOnce IdentityVersion?

我用的TFS的Visual Studio构建步骤建立,与MSBuild的参数

/target:MyProject:publish /property:ApplicationVersion=VersionNumber 

已经安装了新版本的应用程序的部署后不想更新。我检查了清单文件,并发现VersionNumber应用于entryPoint元素的版本,而不是版本的assemblyIdentity元素。

在构建步骤中是否可修复,或者我应该通过自己的脚本更改清单?

回答

1

assemblyIdentity的版本根据目标应用程序而定,因此您需要在目标应用程序的AssemblyInfo.cs文件中更改AssemblyVersion。 (不能通过MSBuild完成)

有很多扩展包含相关的步骤/任务来完成它,例如:Assembly InfoUpdate AssemblyInfo。 (更新版本之前的版本)

+0

非常感谢。 我已经改变了.csproj文件中的ApplicationVersion和Revision而不是AssemblyInfo,但我想它提供了相同的结果。 – Oxoron