Enabling the C# 6.0 Features in the VS “14” CTP

If you’ve been following along with my C# 6.0 features series or have otherwise wanted to experiment with some of the new language features, you may have noticed that they’re not enabled by default. Fortunately, Anthony Green included instructions on how to enable them in a post on the C# FAQ MSDN blog.

To summarize the instructions, the language features are experimental so they must be enabled by manually adding the following to your project file:

<LangVersion>experimental</LangVersion>

This element should be placed within the appropriate PropertyGroup element(s) for your project. Once you’ve added the element, reload the project and enjoy the new features!

About these ads