Tuesday, March 10, 2020

Enabling C# 7.1 in Visual Studio 2017 projects

Today, when I tried to compile one of the Visual Studio projects in our solution - I received the exception "Feature 'default literal' is not available in C# 7.0. Please use language version 7.1 or greater". (For more info see default literal in C# 7.0)



To enable C# 7.1 you need to following these steps:

  • Right click on your project and select Properties, next navigate to the build tab and click Advanced

  • Next you can either choose C#7.1 from the list or choose C# latest minor version (latest).

No comments:

Post a Comment