12

After a long absence of C# I re-installed Visual Studio Community Version 2022 17.4.3.

Then I installed dotnet-sdk-7.0.101-win-x64.

Then I try to start a new console .NET application but I don't have the option to chose the .NET 7 framework. It goes only to up to to 4.8. Is that normal? What should I do to make version 7 visible?

Shows my framework options

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Valmont
  • 328
  • 1
  • 2
  • 11
  • 4
    Pay attention to the project template you selected to get started. You picked one with ".NET Framework" in its name, gives you the legacy framework choices. You want one with just ".NET" in its name. – Hans Passant Dec 27 '22 at 14:08

2 Answers2

8

Manually update Visual Studio 2022 to the latest version.

For some reason it doesn't automatically update to 17.5.x, which is required for .NET 7.0

Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
MGOwen
  • 6,562
  • 13
  • 58
  • 67
4

When creating an application be sure to select correct template - Console App (without additional remarks):

enter image description here

You have selected a template targeting .NET Framework which does not allow targeting .NET (i.e. .NET Core) runtime by default.

Guru Stron
  • 102,774
  • 10
  • 95
  • 132