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.
Can I use C# 7.3 with .Net Framework 4.6.1?
Asked Answered
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.
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. –
Unhelm © 2022 - 2024 — McMap. All rights reserved.
system.codedom → compilers → compiler language="c#;cs;csharp"
propertylangversion
to7.3
and all works. – Bobbybobbye