Disable new C# 6.0 features in ReSharper?

Answered

Hello

At work we code in Visual Studio 2015 Enterprise. That version of Visual Studio does support the new C# 6.0 syntax and language features. Unfortunately, our TeamCity build pipeline doesn't support these new C# features.

So for now, we have to refrain from using any new C# features. Is there a way to tell ReSharper to turn those off?

I would like the ReSharper green tick when the only thing that needs doing is refactoring to use some new feature of C#.

Any help would be greatly appreciated.

Thank You

1 comment
Comment actions Permalink
Official comment

Hello Jwan,

There are a couple of ways:

  1. Select C#5.0 value for "C# Language Level" for each project in a solution (Project node in Solution Explorer | F4 to call Properties | "C# Language Level" property)
  2. Paste the following string to solution settings file ({Solution name}.sln.DotSettings file in the solution's root folder)

 <s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp50</s:String>  

Thanks! 

Please sign in to leave a comment.