我们使用TFS 2013作为构建服务器.我已经开始了一个C#6.0项目,我正在努力建立它.我正在使用新的null条件运算符和我的构建chokes.我已经尝试在TFS服务器上安装了几个东西,包括目标包和VS 2015.我已经尝试将/tv:14.0提供给MSBuild参数.
Configuration\EntityEntityConfig.cs(270):无效的表达式术语'.'
Configuration\EntityEntityConfig.cs(283):无效的表达式术语'.'
Configuration\EntityEntityConfig.cs(283):语法错误,':'预期
......等
在这一点上,我不知道还有什么可以尝试.任何建议将不胜感激.
我在BuildAgent上运行持续集成构建,但我无法正常工作.我最近将代码库更改为C#6.0,并将项目更改为ToolsVersion 14.
我在Build Server(TFS 2012)上安装了Visual Studio 2015.如果我现在检查C#6.0代码,则构建在第一个项目上失败("$"是意外的或"某事")
BuildTemplate是"DefaultTemplate.11.1"如果我检查日志文件,构建调用错误的csc.exe(C:\ Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe)
如果我使用没有任何开关的项目启动MSBuild/14.0/Bin/MSBuild可执行文件,则构建成功.为什么TFS BuildAgent不使用ToolsVersion,如何让TFS 2012构建我的Visual Studio 2015解决方案
如果我添加MSBuildArgument /tv:14.0它仍然失败.因为它称为MSBuild的第12版,它是Visual Studio 2015附带的.NET 4.6 RC Framework的一部分.
如果我尝试运行我的UnitTest,更改MSBuild Activity的ToolsPath确实可以使Build工作但是吐出子弹.我得到了一个Missing dll"Microsoft.VisualStudio.TestPlatform.Utilities.dll"异常.(VS2012也在Build Server上安装).
更新:我现在在单元测试中遇到了不同的错误:
TF900548: An error occurred publishing the Visual Studio test results.
Details: 'Method not found:
'System.Collections.Generic.IEnumerable<System.String>
Microsoft.VisualStudio.TestPlatform.Utilities.InferSettingsHelper.MergeRunSettingsAndFindCompatibleSources(Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
ByRef,
Microsoft.VisualStudio.TestPlatform.ObjectModel.FrameworkVersion
ByRef, System.String, System.String,
System.Collections.Generic.IDictionary`2<System.String,System.Collections.Generic.KeyValuePair`2<Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture,Microsoft.VisualStudio.TestPlatform.ObjectModel.FrameworkVersion>>,
System.Xml.XPath.IXPathNavigable, System.String ByRef)'.'
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Visual Studio 2015 CTP中使用C#6.0的新功能,而我的项目无法在TFS 2013和Visual Studio Online中构建.
我知道Visual Studio使用新的Roslyn编译器,它取代了原生的.NET编译器,因此TFS构建代理无法编译.
我的问题是如何在构建代理上(以及在Visual Studio Online中)安装Roslyn并告诉构建代理使用此编译器而不是本机?