C#6.0 TFS构建 [英] C# 6.0 TFS Builds

查看:77
本文介绍了C#6.0 TFS构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Visual Studio 2015 CTP中试用C#6.0的新功能,而我的项目无法在TFS 2013和

I'm trialing the new features of C# 6.0 within Visual Studio 2015 CTP and my project is failing to build in TFS 2013 and Visual Studio Online.

我了解Visual Studio使用了新的 Roslyn 编译器,该编译器代替了本机.NET,因此使用了TFS构建代理无法编译.

I understand that Visual Studio uses the new Roslyn compiler, which replaces the native .NET one, and the TFS build agent therefore is unable to compile.

我的问题是我如何在构建代理上(以及在Visual Studio Online中)安装Roslyn,并告诉构建代理在本机上使用此编译器?

My question is how do I install Roslyn on the build agent (and within Visual Studio Online) and tell the build agent to use this compiler over native?

推荐答案

对于编译步骤,您有两个选择:

For the compilation step, you have a couple of options:

  1. 您可以在每个项目中引用 Microsoft.Net.Compilers NuGet程序包使用该版本的编译器的依据.
  2. 您可以安装VS 2015 CTP软件包中的Microsoft Build Tools软件包,而无需安装所有VS.
  1. You can reference the Microsoft.Net.Compilers NuGet package on a per-project basis to use that version of the compilers.
  2. You can install the Microsoft Build Tools package that is part of the VS 2015 CTP package without installing all of VS.

但是,正如@MrHinsh指出的那样,这些方法可能会使您错过工具链的其他部分.

However, as @MrHinsh notes, these approaches may leave you missing other parts of your toolchain.

这篇关于C#6.0 TFS构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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