将 TeamCity 内部版本号放入其构建的程序集中
我是 TeamCity 的新手,刚刚安装它并使用 subversion 设置它。 我希望将 TeamCity 内部版本号放入输出文件中,以便我的 Application.exe 具有相同的内部版本号。
我该怎么做?
I am new to TeamCity and I have just installed it and set it up with subversion.
I would like the TeamCity build number to be put in the output files, so that my Application.exe has the same build number.
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
现在 teamcity 中内置了一个 assemblyinfo 修补程序。他们称之为构建功能: http://confluence.jetbrains.net/display/TCD65/ AssemblyInfo+Patcher
将其与提及的参数一起使用或自行制作,例如:1.2.%build.vcs.number%.1
There is now an assemblyinfo patcher built into teamcity. They call it a build feature: http://confluence.jetbrains.net/display/TCD65/AssemblyInfo+Patcher
Use that with the parameters mention or make your own e.g.: 1.2.%build.vcs.number%.1
试试这个:
这是使用 Team City 和 MSBuild。如果您使用 Nant,请尝试以下操作:
try this:
This is using Team City with MSBuild. If you're using Nant try this:
我在从 svn 获取源代码之后和构建开始之前运行 powershell 脚本。
或多或少是这样的。
http://jake.murzy.com /post/3099699807/如何更新程序集版本号与teamcity
I run a powershell script after getting the sources from svn and before the build starts.
More or less like so.
http://jake.murzy.com/post/3099699807/how-to-update-assembly-version-numbers-with-teamcity