Error Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default

前端 未结 7 552
悲哀的现实
悲哀的现实 2020-12-13 11:58

I am trying to target .NET 4.6 and also take advantage of the latest C# version by changing the C# language version to 6.

However during compilation I got this error

7条回答
  •  时光说笑
    2020-12-13 12:14

    See an answer to ASP.NET strange compilation error!.

    Downgrading your C# language to 5 only masks the problem, as soon as someone uses a C# 6 feature your website/project will break and you will still spend time fixing it again. Try the solution in the link.

提交回复
热议问题