I'm trying to use VB 15.0 in an ASP.NET website project, but when I try to set the language version to 15.0, I get the following error:
BC2014: the value '15.0' is invalid for option 'langversion'
And if I set it to latest, I get this error:
BC2014: the value 'latest' is invalid for option 'langversion'
I'm "setting the language version" by changing the /langversion: section of the line
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
of my Web.config to /langversion:15.0 or /langversion:latest.
So far I have tried ensuring my Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers NuGet packages are up to date as explained in the answers to this question.
I can't seem to find anything similar to this problem. What should I do?
Edit: /langversion:default results in that same error, and so does /langversion:13. Values 12 and below, however, do work.