【问题标题】:Visual Studio Team Services Assembly VersioningVisual Studio Team Services 程序集版本控制
【发布时间】:2015-12-23 05:52:00
【问题描述】:

我正在使用 Visual Studio Team Services。我已经使用 Hosted Build Controller 和 Hosted Build Agent 创建了一个构建定义。我使用了一个 powershell 脚本,使用 TFS 内部版本号自动将版本号分配给程序集文件或 .exe 文件。

为此,我已按照以下给定链接进行操作。

http://geeks.ms/blogs/jlsoria/archive/2014/02/17/get-your-binaries-versioned-automatically-in-less-than-5-minutes-with-tfs-build-2013.aspx

http://www.colinsalmcorner.com/post/matching-binary-version-to-build-number-version-in-tfs-2013-builds

但我无法为我的 .exe 应用程序分配版本。它始终从 AssemblyInfo.cs 文件中获取版本号。我的目的是将 TFS 内部版本号的值分配给我的程序集文件。

【问题讨论】:

  • 有问题的脚本 - 至少是第二个链接中的脚本 - 在构建之前更改 AssemblyInfo.cs 中的值。您应该在构建日志中查看脚本的输出,并了解那里没有工作 - 检查参数和输出。

标签: c# visual-studio powershell tfs azure-devops


【解决方案1】:

步骤如下:

1)。将 UpdateVersion.ps1 PowerShell 文件(内容来自 blog)签入 TFS 版本控制。

2)。通过在预构建脚本中选择它来设置 UpdateVersion.ps1 脚本以运行。

3)。将内部版本号格式设置为:$(BuildDefinitionName)_1.0.1$(Rev:.r)

【讨论】:

    猜你喜欢
    • 2016-01-07
    • 1970-01-01
    • 1970-01-01
    • 2013-02-21
    • 1970-01-01
    • 1970-01-01
    • 2016-08-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多