C# 7.0 in Visual Studio Enterprise 2015

Yes, you can replace the compiler shipped with Visual Studio for a C# 7-enabled version by installing the Nuget package Microsoft.Net.Compilers:

Referencing this package will cause the project to be built using the specific version of the C# and Visual Basic compilers contained in the package, as opposed to any system installed version.

There is no indication that I can see on the package page as to whether this is officially supported in Visual Studio 2015. My not-thorough tests so far indicate that it works but not painlessly - C# 7 code compiles, but is underlined with the red squiggly line which indicates a syntax error:

Screenshot Note that you will also need to install the Nuget package System.ValueTuple to use the new C# 7 value tuples features.


You have to download/checkout and build the NET Compiler Platform ("Roslyn") from Github and then you can test the C# 7 Features with VS 2015!

More Info:

https://github.com/dotnet/roslyn/tree/master

If you like video tutorials, than watch this video:

https://joshvarty.wordpress.com/2016/02/10/lrn-quick-tip-how-to-test-out-c-7-features-with-roslyn/