Running TFS Build with C# 6.0 features(使用 C# 6.0 功能运行 TFS 构建)
问题描述
我最近才开始在我的项目中使用 C# 6.0 的 nameof()
运算符.现在(签入时,呃...)我(或者更好的是:构建代理)拒绝构建项目(在本地编译得很好),因为它找不到 nameof()
表达.
I just recently began using the nameof()
operator of C# 6.0 in my projects. Now (upon check-in, duh...) I (or better: the build agent) refused to build the project (which was compiling locally just fine) because it could not find the nameof()
expression.
我开始在构建控制器以及 TFS 服务器本身上安装 VS 2015,但无济于事.如何让我的 TFS 2013 Update 5 构建具有 C# 6.0 功能的项目?
I began installing VS 2015 on the build controller as well as the TFS server itself, but to no avail. How can I get my TFS 2013 Update 5 to build projects with C# 6.0 features?
我已经考虑过编辑 BuildProcessTemplate,但我们在所有构建定义中一直使用默认模板,我什至不知道这是否是正确的方法.
I already thought of editing the BuildProcessTemplate, but we're using the default template all the way through all our build definitions and I even didn't know if this was the right way to go.
推荐答案
您可以安装 "Microsoft Build Tools 2015" 在构建代理计算机上并配置构建模板以使用该版本的 msbuild,或者在您要使用新版本构建的项目中安装 Microsoft.Net.Compilers NuGet 包编译器.
You can either install the "Microsoft Build Tools 2015" on the build agent machine and configure the build template to use that version of msbuild, or else install the Microsoft.Net.Compilers NuGet package in the projects you want to build with the new compiler.
这篇关于使用 C# 6.0 功能运行 TFS 构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 C# 6.0 功能运行 TFS 构建


- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01