12

I have installed .NET core 3.1 and verified i can run .NET core 3.1 apps on my machine however when i go to create a new project the dropdown for target frameworks only allows .NET 6.0. I am using visual studio 2022. I am using visual studio 2019 on my laptop and i can add .NET core projects just fine.

enter image description here

Has anyone ran into this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Maxqueue
  • 2,194
  • 2
  • 23
  • 55
  • 5
    In order to **run** a .NET Core 3.1 app, you need the .NET Core 3.1 runtime - which you obviously have, if you can run the app. But for VS 2022 to be able to use .NET Core 3.1 as a targetting platform, you need the .NET Core 3.1 **SDK** - not just the runtime...... – marc_s Dec 12 '21 at 21:37
  • https://dotnet.microsoft.com/en-us/download/visual-studio-sdks – Caius Jard Dec 12 '21 at 21:43

3 Answers3

18
  • Open Visual studio installer from start menu
  • Select Modify from Visual Studio that you want to add
  • in individual components select .net core or framework that you want to add to your visual studio version

1

2

3

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
Saj
  • 189
  • 1
  • 2
5

Create the app in either 5 or 6. Then in the Application properties change the Target Framework to .Net 3.1.

Change in Visual Studio after Project Creation

Long term support is limited for anything before .Net 5, so they are not making it an option on new projects and directing to the newer versions.

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
3

I'm using VS2022 and was facing the same issue. I installed the .NET SDK 3.1.416 from here and restarted the VS. I am now able to create project with .NET core 3.1 target framework.

Target framework 3.1 - VS2022

Ashique Razak
  • 487
  • 3
  • 8