New C sharp 7 features in action: Migrate existing .NET 4 or .NET 4.5 Application to VS 2017 to support/enable C sharp 7
Step 1: Open your existing .NET 4 or .NET 4.5 application in VS 2017, this will work smoothly.
Step 2: Update Nuget package to support/enable C# 7
Existing packages that are required to be updated:
Update Microsoft.Net.Compilers & Microsoft.CodeDom.Providers.DotNetCompilerPlatform to latest versions.
Step 3: Support for C# 7 Tuple Types and Tuple Literals
Install System.ValueTuple Nuget package
That’s it, you should be able to use C# 7 features in your .Net Application.
Step 4: Set Language Version to C# 7 in of C# project file (not required in most of the cases)
Happy Coding !!!