TFS 托管构建控制器 - 未找到 Microsoft.TextTemplating.targets [英] TFS Hosted Build Controller - Microsoft.TextTemplating.targets not found

查看:22
本文介绍了TFS 托管构建控制器 - 未找到 Microsoft.TextTemplating.targets的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经调试了一天的问题,但似乎无法弄清楚.也许其他人遇到了类似的事情并且可以提供一些启示?

I've been debugging an issue for a day now and can't seem to figure it out. Perhaps someone else has run into something similar and can shed some light?

我们已将解决方案中项目中的所有 T4 模板配置为在构建项目时运行,如 shift-ctrl-b.这很好用 - 它需要我们将此导入语句添加到项目 .csproj 文件中:

We've configured all T4 templates within a project in our solution to run when the project is built, as in shift-ctrl-b. This works great - it required us to add this import statement to the project .csproj file:

<Import Project="$(MSBuildExtensionsPath)MicrosoftVisualStudiov10.0TextTemplatingMicrosoft.TextTemplating.targets"/>

我们已经通过 Visual Studio 2012 和云 TFS (tfs.visualstudio.com) 建立了持续集成.当我们的解决方案在 TFS 的托管控制器上构建时,我们不断收到以下错误:

We've set up continuous integration through Visual Studio 2012 and cloud TFS (tfs.visualstudio.com). When our solution is being built on TFS' hosted controller, we keep receiving the following error:

未找到导入的项目C:Program FilesMSBuildMicrosoftVisualStudiov10.0TextTemplatingMicrosoft.TextTemplating.targets".确认声明中的路径正确,并且该文件存在于磁盘上.

The imported project "C:Program FilesMSBuildMicrosoftVisualStudiov10.0TextTemplatingMicrosoft.TextTemplating.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

在我们的开发机器上,该文件存在,因此问题似乎是该文件在托管构建服务器上不存在.

On our dev machines, the file exists and thus the problem seems to be that the file doesn't exist on the hosted build server.

如果我们的假设是正确的,除了安装我们自己的 TFS 构建服务器之外,是否还有解决此问题的方法?

If we're correct with this assumption, is there a workaround to this issue besides installing our own TFS build server?

推荐答案

我怀疑托管构建服务器上是否装有 Visual Studio 2010 (v10.0).

I doubt the hosted build servers have Visual Studio 2010 (v10.0) on them.

您可以在此处获取当前安装在托管构建服务器上的列表,Tarun Arora 有更多详情这里.

You can get a list of what is currently installed on the hosted build servers here, Tarun Arora has more details here.

对于您的问题,请尝试使用 11.0 版本(适用于 VS2012):

For your problem, try version 11.0 (for VS2012) instead:

<Import Project="$(MSBuildExtensionsPath)
    MicrosoftVisualStudiov11.0TextTemplatingMicrosoft.TextTemplating.targets"/>

更好的方法是使用 VisualStudioVersion MSBuild 属性:

A better approach would be to use the VisualStudioVersion MSBuild property:

<Import Project="$(MSBuildExtensionsPath)
    MicrosoftVisualStudiov$(VisualStudioVersion)TextTemplatingMicrosoft.TextTemplating.targets"/>

这将确保托管构建服务器的未来更新不会影响您的代码.请阅读此处了解更多详情.

This will ensure that future updates to the Hosted Build Servers do not impact your code. Have a read up here for more details.

这篇关于TFS 托管构建控制器 - 未找到 Microsoft.TextTemplating.targets的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆