.NET Core not showing in target framework dropdown for visual studio 2022
Asked Answered
S

4

15

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?

Solipsism answered 12/12, 2021 at 21:11 Comment(2)
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......Cousingerman
dotnet.microsoft.com/en-us/download/visual-studio-sdksShantishantung
D
6

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.

Duroc answered 12/12, 2021 at 21:53 Comment(0)
V
23
  • 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

Valer answered 12/2, 2022 at 0:3 Comment(2)
Simply updating VS fixed the problem for meLeadsman
Yes, simply updating the VS to the latest worked for me too.Lithotomy
D
6

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.

Duroc answered 12/12, 2021 at 21:53 Comment(0)
B
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

Boeschen answered 10/1, 2022 at 11:57 Comment(0)
R
0

None of these worked for me. There is an option to Upgrade the project with Visual Studio Upgrade Assistant. Right click on the project and "Upgrade", then following the steps to either install the assistant if not present, or directly choose another .NET framework otherwise.

Remus answered 17/6 at 11:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.