在 TFS2015 上构建 Sitecore 项目时出错

Error building Sitecore project on TFS2015

我刚刚在一台新服务器(本地)上安装了 TFS2015,现在我正在尝试设置 TFS2015 版本以复制我的 xaml 版本,但我收到了一个我不明白的错误。这是错误:

构建于 2016 年 8 月 31 日 12:36:33 下午开始。 1> 节点 1 上的项目 "C:\Agent_work\s\Source\BOTWSitecore.sln"(清理
目标)。
1>验证解决方案配置:
构建解决方案配置 "release|any cpu".
C:\Program Files
(x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(141,5):错误:构建输出路径必须相对于 TDS 项目根目录.
1>项目 "C:\Agent_work\s\Source\BOTWSitecore.sln" (1) 正在建设
"C:\Agent_work\s\Source\BOTWTDS\BOTWTDS.scproj" (11) 在节点 2 上(清理
目标)。
11>C:\Program Files
(x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(141,5): 错误:构建输出路径必须相对于 TDS 项目根目录。 [C:\Agent_work\s\Source\BOTWTDS\BOTWTDS.scproj]
11> 完成建筑项目 "C:\Agent_work\s\Source\BOTWTDS\BOTWTDS.scproj"
(清洁目标)——失败。 1> 完成建筑项目 "C:\Agent_work\s\Source\BOTWSitecore.sln"(清洁目标)-- 失败。
构建失败。
"C:\Agent_work\s\Source\BOTWSitecore.sln"(清理目标)(1) ->
"C:\Agent_work\s\Source\BOTWTDS\BOTWTDS.scproj"(清理目标)(11) ->
(SitecoreBuildClean 目标)->
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(141,5): 错误:构建输出路径必须相对于 TDS 项目根目录. [C:\Agent_work\s\Source\BOTWTDS\BOTWTDS.scproj]
0 个警告
1 个错误
已用时间 00:00:01.06
进程 'msbuild.exe' 已退出,代码为“1”。
****************************************************** ****************************
完成任务:VSBuild
****************************************************** ****************************
不支持给定路径的格式。
****************************************************** ****************************
完成构建
****************************************************** ****************************
Worker Worker-03d1961b-0fe4-478f-9fa1-2d25cb7cfcb4 完成 运行 工作
03d1961b-0fe4-478f-9fa1-2d25cb7cfcb4

有人知道问题出在哪里吗?

您需要在生成服务器上安装 TDS向生成服务器提供 MSBuild 用于生成 TDS 项目的文件。这些文件可以在任何安装了 TDS 的机器上的错误中指定的位置找到。您将需要包含 .targets 文件的文件夹中的所有内容。

您最好确保您的构建服务器(构建代理)上的环境与您本地的环境相同。这将大大降低构建失败的风险。如果安装 TDS 后还是不行,你可以尝试在构建代理(机器)上手动构建,而不是通过 tfs 来缩小问题是否与代理环境或 TFS 构建定义设置有关。

在这个 link 中看起来与 Narasimha 的问题相同:AUTOMATING SITECORE DEPLOYMENTS WITH TFS AND TDS 以下是解决方法:

I came to know from hedgehog that this is a tds error and they sent me below message. In order to avoid this error, a line inside the TDS .targets file, which checks the output directory, needs to be commented out. Assuming that you have already TDS installed on your build server, the .targets file is located at “C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets”.