Select C# version in Visual Studio
Want to try out features of newest of some specific version of C# but Visual Studio 2017 can’t compile it? Well, by default major versions of C# are supported and if some other version is needed it must be turned on from project settings. This blog post shows how to switch between C# versions in Visual Studio 2017.
To make Visual Studio 2017 to use some other version of C# follow the steps shown on the following image.
For those who need some more help the steps are described here:
- Right click on the project name and select Properties from context menu
- Select Build tab from left
- Scroll down and click Advanced button to open advanced build settings
- From Language version dropdown select C# version you are interested in
C# latest minor version (latest) is the option to select if you want latest version of C#.
NB! If you are writing some program that is later deployed to some other box be careful when playing with these settings as target environment may use older version of C#. Make it sure first what version of C# is available on target environment and then make your selection.
Same steps work also for Visual Studio 2015 but C# 6.0 is currently the latest version of C# available there.
Pingback:The Morning Brew - Chris Alcock » The Morning Brew #2516