0

I installed .NET 6. Using Visual Studio 2019. Checked .net version by typing dotnet --info. Everything is okay. However, when I create a new project in VS, I don't see .NET 6 in a dropdown menu. It's .NET 5 by default. Nevertheless, changed the version in .csproj file. The content of the file is:

 <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <LangVersion>preview</LangVersion>
    <EnablePreviewFeatures>true</EnablePreviewFeatures>
 </PropertyGroup>

The problem is I can't use any new C# 10 features. Can't even change C# version in Advanced properties: example

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
unriale
  • 49
  • 6
  • 2
    you must be missing right frameworks. try downloading VS2022 and see if it works. – Bharat Feb 08 '22 at 12:59
  • 1
    What does "I installed .net 6" mean?> What *exactly* did you install? What frameworks settings do you have on the Application page of those settings? See https://dotnet.microsoft.com/en-us/download/dotnet/6.0 - only certain preview versions work on 2019, but people also come saying they "installed it" and it turns out they installed the runtime, not the SDK – Caius Jard Feb 08 '22 at 12:59
  • 1
    VS2022 -> .NET 6 -> C#10 – Camilo Terevinto Feb 08 '22 at 13:01
  • @CaiusJard I mean SDK 6.0.101 for Windows (x64). – unriale Feb 08 '22 at 13:05
  • 2
    You need 2022 for that one.. See "Visual Studio Support" header of https://dotnet.microsoft.com/en-us/download/dotnet/6.0 – Caius Jard Feb 08 '22 at 13:05

0 Answers0