Invalid option '14' for /langversion with .NET 10 installed and in use
I cannot for the life of me figure out what's wrong here. I just switched the projects in my solution over to .NET 10 and C# 14, confirmed we are building with .NET 10 and bundled MSBuild, but it fails to recognize C# 14?
C:\Program Files\dotnet\dotnet.exe exec "C:\Program Files\dotnet\sdk\10.0.100-preview.7.25380.108\Roslyn\bincore\csc.dll"
0>CSC: Error CS1617 : Invalid option '14' for /langversion. Use '/langversion:?' to list supported values.
Any ideas?3 Replies
Checking langversion doesn't list 14. Not sure how I could tell but maybe it expects me to set it to 'preview'?
Yes, you must use
preview
for 14, since it is not officially released yet.I see, thank you!