TFS 2013构建.NET 4.6 / C#6.0TFS、NET

2023-09-02 10:23:47 作者:无意流浪

我们使用TFS 2013年将成为我们构建服务器。我已经开始了一个C#6.0的项目,我想获得它来构建。我现在用的是新的空有条件的经营者,我的构建扼流圈。我试着安装TFS服务器上的几件事情,其中​​包括针对包和VS 2015年我试图提供/tv:14.0到的MSBuild参数。

We use TFS 2013 to as our build server. I've started a C# 6.0 project and I am trying to get it to build. I am using the new null-conditional operators, and my build chokes. I've tried installing several things on the TFS server, including the targeting pack and VS 2015. I've tried providing /tv:14.0 to the MSBuild arguments.

配置 EntityEntityConfig.cs(270):'无效EX pression长期   配置 EntityEntityConfig.cs(283):无效的EX pression长期'。   配置 EntityEntityConfig.cs(283):语法错误,':'预期   ...等。

ConfigurationEntityEntityConfig.cs (270): Invalid expression term '.' ConfigurationEntityEntityConfig.cs (283): Invalid expression term '.' ConfigurationEntityEntityConfig.cs (283): Syntax error, ':' expected ... etc.

在这一点上,我不知道还有什么尝试。任何建议,将不胜AP preciated。

At this point, I have no idea what else to try. Any suggestions would be greatly appreciated.

推荐答案

使用TFS 2012人报告使用成功:

People using TFS 2012 have reported success using:

/tv:14.0 /p:GenerateBuildInfoConfigFile=false /p:VisualStudioVersion=14.0

作为参数的MSBuild。也许这会为你工作,但到目前为止,这并没有对我的TFS 2013生成代理工作。

as arguments to MSBuild. Perhaps this might work for you, but so far this does not work for my TFS 2013 build agents.

更新: 我终于得到这个工作在TFS 2013年这是我必须做的:

Update: I finally got this to work on TFS 2013. Here is what I had to do:

在安装VS 2015年微软构建工具2015(我有两个)。 编辑我的生成使用一个名为 TfvcTemplate.12.xaml 生成过程模板。我想,比这个新的任何模板都行,但DefaultTemplate.11.1.xaml肯定是行不通的!) 设置的MSBuild参数为 /tv:14.0 我没有使用其他两个我上面提到的。 Install VS 2015 or Microsoft Build Tools 2015 (I have both). Edit my build to use a build process template called TfvcTemplate.12.xaml. I guess that any template newer than this one will do, but the DefaultTemplate.11.1.xaml definitely won't work!) Set MSBuild arguments to /tv:14.0 I did not have to use the other two I mentioned above.