3 comments
Official comment

Hello Filip!

 

Thank you for contacting us.

You can specify the target C# version explicitly by selecting the project in the Solution Explorer and using the C# Language Level property in the Visual Studio's Properties window (choose View | Properties Window in the menu).

Thank you.

Avatar
Permanently deleted user

Yes, that's what I have written.

But the question was if it is possible to specify it in ReSharper (to override project settings) because after opening the project in VS2017 it changes to C#7.1 (opposed to VS2015 where it is 6.0). Please see the question on StackOverflow I provided in the original post.

EDIT

The SO question got anwered, copying it here for reference:

Add line below into dotSettings file ({Solution name}.sln.DotSettings)

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

0
Avatar
Permanently deleted user

This is more important now, because as of VS 2019 you can't easily change the language version of your Project, because it is bound to the used .NET. ReSharper suggested Preview 8-C# features to me that I couldn't switch off without resorting to Filips solution.

https://docs.microsoft.com/de-de/dotnet/csharp/language-reference/configure-language-version

2

Please sign in to leave a comment.