Visual Studio allows you to choose the C# language latest versions for your project. To choose the C# language latest versions, In Visual Studio, from the Solution Explorer, right-click on the project and select Properties -> Build Tab. And, then Select Advanced button. This will bring “Advanced Build Settings” windows, where you can check the drop-down option for “Language Version”. You can refer to one of my old tip – How To Check Default Language Version In Visual Studio?
C# language latest versions
In the Earlier versions of Visual Studio, the language version used to set as default, to pick the default languages version installed. Now, there is a change. By default, it now referring the to major released version – (C# latest major version) starting from the release of language version C# 7.1. With that selected, you will only able to use the features of C# 7.0, irrespective of you have other versions of C# 7.1 or C# 7.2 installed. Unless you made explicit changes to select the minor version it will use the major version as default. Navigate to Properties -> Build -> Advanced, select “C# latest minor version(latest)” to pick latest installed minor version.
The C# latest major version is the default language version set, and choosing the “C# latest minor version” it will always refer to latest C# version, in this case it will refer to C# 7.2.
Here is the quick difference between two version of Visual Studio
Hope this helps!
This is really helpful when we want to check/use the features of a minor release without waiting for the major C# release.
Pingback: Using Quick Actions in Visual Studio to upgrade project's language version
Thanks Ashwin. You may found the recent tip “ Using Quick Actions in Visual Studio to upgrade project’s language version” interesting as well..
Pingback: Dew Drop - November 22, 2017 (#2609) - Morning Dew
Good tips , very useful. thanks!