You need to update nuget package named “Microsoft.Net.Compilers” to the latest version. Most likely you have version 1.3.2 installed in your project but you need 2.0.1 to use C# 7 features. Alternatively – you can remove this package at all (together with packages that depend on it) – then it will also work, because it will use your installed compiler, but I don’t recommend doing that.
As this package description says:
.Net Compilers package. 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.
So that is why it uses C# 6 compiler for you now.