9

I'm interested in enum generic constraints, but when I'm switching language version for project on Build → Advanced I'm still getting error «not available in C#5; please use language version 7.3 or greater» even after reopening the project.
Project type is an ASP.NET MVC application.

Troll the Legacy
  • 675
  • 2
  • 7
  • 22

1 Answers1

3

I've installed Microsoft.Net.Compilers and Microsoft.CodeDom.Providers.DotNetCompilerPlatform packages from Nuget, then changed in web.config system.codedom → compilers → compiler language="c#;cs;csharp" property langversion to 7.3, reloaded project and all worked.

Troll the Legacy
  • 675
  • 2
  • 7
  • 22
  • not working for me, already updated both `Microsoft.Net.Compilers` and `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` to the latest version which is `v3.6.0` at the moment. The `langversion` is correctly set to `7.3` but still cannot build the project. – Hopeless Jul 12 '20 at 10:00