VS Code CSC : error CS1617: Invalid option '7.3' for /langversion

asp.net-core blazor c# c#-7.3 visual-studio-code

Question

I downloaded VS 2017 15.7, .NET Core 2.1.2 and Blazor to try it out. It wasn't working in VS 2017 properly and thought I would try through the dotnet cli and VS Code. Instead I was met with the following error:

CSC : error CS1617: Invalid option '7.3' for /langversion.

In VS, it will run the application show "Loading..." and then nothing. Not sure if the two issues are related

dotnet --info returns the following:

.NET Command Line Tools (2.1.300-preview1-008174)

Product Information:
 Version:            2.1.300-preview1-008174
Commit SHA-1 hash:  b8df89a54f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17666
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\

Microsoft .NET Core Shared Framework Host

  Version  : 2.1.0-preview1-26216-03
  Build    : f2c3216183d20416568a4bbf5bb7d153e826f153
1
6
12/18/2018 3:37:07 PM

Accepted Answer

Your should use the Preview version of VS for trying out Blazor, which is numbered 15.8.x

vs installer

And install the .net core 2.1 RC. 2.1.2 will not cut it.

3
5/10/2018 8:35:25 AM

Popular Answer

You can use one of the 15.7 previews or above. It's a bit pointless to use those now that the 15.7 final is out. You can also use the 15.8 previews as they are incremental on top of that 15.7 final. Visit blazor.net for up to date details of getting started etc.



Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow