Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 574
FICHEKK Avatar asked Sep 22 '18 14:09

FICHEKK


People also ask

What is Windows Universal CRT?

The Windows 10 Universal CRT is a Windows operating system component that enables CRT functionality on the Windows operating system. This update allows Windows desktop applications that depend on the Windows 10 Universal CRT release to run on earlier Windows operating systems.

What is C run time?

The C runtime Library (CRT) is the part of the C++ Standard Library that incorporates the ISO C standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development.


2 Answers

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

like image 140
FICHEKK Avatar answered Oct 17 '22 01:10

FICHEKK


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

like image 4
Saif Avatar answered Oct 16 '22 23:10

Saif