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

查看:107
本文介绍了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 所示.效果很好-它要求我们将此import语句添加到项目.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)\Microsoft\VisualStudio\v10.0\TextTemplating\Microsoft.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 Files \ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ TextTemplating \ Microsoft.TextTemplating.targets".确认声明中的路径正确,并且文件在磁盘上.

The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TextTemplating\Microsoft.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)
    \Microsoft\VisualStudio\v11.0\TextTemplating\Microsoft.TextTemplating.targets"/>

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

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

<Import Project="$(MSBuildExtensionsPath)
    \Microsoft\VisualStudio\v$(VisualStudioVersion)\TextTemplating\Microsoft.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天全站免登陆