如何禁用在Visual Studio 2015的C#6支持? [英] How do I disable C# 6 Support in Visual Studio 2015?

查看:357
本文介绍了如何禁用在Visual Studio 2015的C#6支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有我们在2015年VS用C#开发6某个项目启用,偶尔需要使用VS 2013的开发人员没有C#打开6。

We have a project that we're developing in VS 2015 with C#6 enabled that occasionally needs to be opened by developers using VS 2013 without C#6.

我们无意使用C#6这个特殊的解决方案中(就像我想)。

We have no intention to use C# 6 within this particular solution (as much as I'd like to).

Visual Studio和ReSharper的建议有用的C#6语言结构呈现不C#中的解决方案在早期版本的Visual Studio中无法运行6支持。

Visual Studio and ReSharper suggest helpful C# 6 language constructs that render the solution inoperable in earlier versions of Visual Studio without C#6 support.

我已经禁用ReSharper的ç #6支持但我似乎无法禁用在整个解决方案/限制C#的功能。

I've disabled the ReSharper C#6 support but I can't seem to disable / limit C# features across the whole solution.

我如何限制C#到C#5功能的解决方案中或Visual Studio 2015年中?

How do I limit C# to C#5 capabilities within a solution or within Visual Studio 2015?

推荐答案

您可以通过单独将设置每个项目的语言特性属性= GT;构建标签=>高级按钮=>语言版本,并设置您的首选版本。

You can set the language feature for each project separately by going to Properties => Build tab => Advanced button => Language Version and set your preferred version.

您应该认识到,它仍然会使用新的C#6.0.net编译器平台(代号罗斯林)。然而,编译器的模拟的旧的编译器的行为,并会限制你只在特定的语言版本提供的功能。

You should realize that it will still use the new "C# 6.0" .Net Compiler Platform (codenamed Roslyn). However, that compiler will imitate the behavior of older compilers and will limit you to features only available on that specific language version.

我不认为有可用的解决方案范围的设置。

I don't think that there's a solution-wide setting available.

这篇关于如何禁用在Visual Studio 2015的C#6支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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