团队城市和 MSBuild集成

发布于 2024-08-01 18:57:34 字数 79 浏览 4 评论 0原文

有没有办法让 TeamCity 的内部版本号与 MSBuild 的发布任务生成的发布版本 (ApplicationRevision) 号相匹配?

Is there any way to get TeamCity's build numbering to match the publish version (ApplicationRevision) number generated by MSBuild's publish task?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

分分钟 2024-08-08 18:57:34

您可以通过构建日志中特殊格式的消息来控制 TeamCity 中的构建号。 这可以在任何阶段(例如在发布期间)输出,并将导致最初分配的内部版本号发生变化。 请参阅此处了解更多信息。

例如,我们的 msbuild 将版本输出为内部版本号:

<Message Text="##teamcity[buildNumber '$(FullVersion)']"/>

You can control the build number in TeamCity via a specially formatted message in the build log. This can be output at any stage (e.g. during publish) and will cause the initially assigned build number to change. See here for more info.

For example, our msbuild has this to output the version as the build number:

<Message Text="##teamcity[buildNumber '$(FullVersion)']"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文