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

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

问题描述

我正在 Visual Studio 2015 CTP 中试用 C# 6.0 的新功能,但我的项目未能在 TFS 2013 和 Visual Studio Online.

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天全站免登陆