Using C# 7.1 with MSBuild

后端 未结 6 1167
粉色の甜心
粉色の甜心 2020-12-16 10:44

To use the new C# 7.1 language features with Visual Studio 2017, you add the setting latest to your project file(s).

6条回答
  •  有刺的猬
    2020-12-16 11:10

    Nuget packages

    • Microsoft.Net.Compilers nuget package does not work and needn't to be installed.

    Set the following project/build settings

    • Set at least C# 7.1 or higher in the Debug and Release build properties. (via: Project menu > [ProjectName] Properties > Build tab > [Advanced] button > Language Version).

    • Setting it to latest does not work.

    Also make sure that you are running the latest MSBuild version.

提交回复
热议问题