C# 7 local function not working as expected and no errors being displayed

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)