转换构建以使用 TFS 2017 引擎时遇到问题
Trouble converting a build to use the TFS 2017 engine
我继承了一个从 运行 .proj 文件开始的构建过程(只是一个免责声明 - 我没有写这些东西!!)。我正在尝试将其转换为 TFS2017 构建并将 运行 转换为问题。 .proj 文件以以下内容开头:
<UsingTask TaskName="Microsoft.TeamFoundation.Build.Tasks.GetBuildProperties"
AssemblyFile="$(VS120COMNTOOLS)..\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll"
Condition=" '$(BuildUri)' != '' "/>
VS120COMNTOOLS
解析为 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\,因此 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll 确实存在,但由于某种原因无法解析。
我得到的错误是这样的:
InitVariables:
Running InitVariables TeamFoundationServerUrl= BuildUri=
installer\dev\common\UpdateVersionInfo\uvi.proj(66,5): Error MSB4036: The "GetBuildProperties" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild.0\bin" directory.
知道为什么吗?
由于项目是使用太旧的引擎创建的,某些dependencies/components可能无法在新引擎中正确引用。
在我看来,没有必要花太多时间去调试这个问题。正如丹尼尔所说,我们建议重新创建构建的意图,而不是尝试直接移植 TFS 2008 风格的构建项目文件。
因此,您可以使用适用于 TFS2017 构建过程的 C# 程序重写它。
我继承了一个从 运行 .proj 文件开始的构建过程(只是一个免责声明 - 我没有写这些东西!!)。我正在尝试将其转换为 TFS2017 构建并将 运行 转换为问题。 .proj 文件以以下内容开头:
<UsingTask TaskName="Microsoft.TeamFoundation.Build.Tasks.GetBuildProperties"
AssemblyFile="$(VS120COMNTOOLS)..\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll"
Condition=" '$(BuildUri)' != '' "/>
VS120COMNTOOLS 解析为 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\,因此 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll 确实存在,但由于某种原因无法解析。
我得到的错误是这样的:
InitVariables:
Running InitVariables TeamFoundationServerUrl= BuildUri=
installer\dev\common\UpdateVersionInfo\uvi.proj(66,5): Error MSB4036: The "GetBuildProperties" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild.0\bin" directory.
知道为什么吗?
由于项目是使用太旧的引擎创建的,某些dependencies/components可能无法在新引擎中正确引用。
在我看来,没有必要花太多时间去调试这个问题。正如丹尼尔所说,我们建议重新创建构建的意图,而不是尝试直接移植 TFS 2008 风格的构建项目文件。
因此,您可以使用适用于 TFS2017 构建过程的 C# 程序重写它。