'How to update C# version in Visual Studio Code?

I have installed C# extensions, my .NET framework is updated, I just can't fix it.

enter image description here



Solution 1:[1]

I have found the fix and I hope this will help someone in the future.

  1. Find your .csproj file.
  2. Change LangVersion property to desired version.

enter image description here

Solution 2:[2]

In vs code
Go to the .csproj file and change

         <LangVersion>4.0</LangVersion>

to any version you want eg. <LangVersion>7.2</LangVersion>

In Visual Studio

Right-click on the project node in Solution Explorer and select Properties.

Select the Build tab and select the Advanced button.

In language version dropdown, select any version you want.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 FICHEKK
Solution 2 Jono