简体   繁体   English

.NET 核心未显示在 Visual Studio 2022 的目标框架下拉列表中

[英].NET Core not showing in target framework dropdown for visual studio 2022

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 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.我正在使用 Visual Studio 2022。我在笔记本电脑上使用 Visual Studio 2019,我可以添加 .NET 核心项目就好了。

在此处输入图像描述

Has anyone ran into this?有没有人遇到过这个?

  • Open Visual studio installer from start menu从开始菜单打开 Visual Studio 安装程序
  • Select Modify from Visual Studio that you want to add Select 从要添加的 Visual Studio 修改
  • in individual components select .net core or framework that you want to add to your visual studio version在单个组件中 select .net 要添加到 Visual Studio 版本的核心或框架

1

2

3

Create the app in either 5 or 6. Then in the Application properties change the Target Framework to.Net 3.1.在 5 或 6 中创建应用程序。然后在应用程序属性中将目标框架更改为 .Net 3.1。

创建项目后 Visual Studio 中的更改

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.对.Net 5 之前的任何东西的长期支持都是有限的,因此他们没有将其作为新项目的选项并指向较新的版本。

I'm using VS2022 and was facing the same issue.我正在使用 VS2022 并面临同样的问题。 I installed the .NET SDK 3.1.416 from here and restarted the VS.我从这里安装了 .NET SDK 3.1.416 并重新启动了 VS。 I am now able to create project with .NET core 3.1 target framework.我现在可以使用 .NET 核心 3.1 目标框架创建项目。

目标框架 3.1 - VS2022

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM