Visual Studio在目标框架下拉列表中不显示.NET Core 2.2 [英] Visual Studio does not display .NET Core 2.2 in Target Framework dropdown

查看:326
本文介绍了Visual Studio在目标框架下拉列表中不显示.NET Core 2.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚克隆到一个已经存在的项目中工作,并且发现由于某种原因,Visual Studio拒绝在属性->应用程序菜单的目标框架下拉菜单中显示.NET Core 2.2。

I just cloned into an already existing project for work, and have found that for some reason, Visual Studio refuses to show .NET Core 2.2 in the "Target Framework" dropdown menu in the Properties -> Application menu.

我已经安装了.NET Core 2.2(通过单击安装其他框架并下载/运行2.2 SDK文件。最初安装的是x64版本,因为这就是我的老板使用,但后来我也安装了x84版本以查看是否有效。两者均无效。),并确认已正确安装。我是通过在外壳程序中运行命令 dotnet --info来完成此操作的,它输出以下内容:

I have installed .NET Core 2.2 (by clicking "install other frameworks" and downloading/running the 2.2 SDK file. I have originally installed the x64 version as that's what my boss uses, but I later also installed the x84 version to see if that worked. Neither works.), and confirmed that this is correctly installed. I did this by running the command "dotnet --info" in the shell, which outputs the following:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.101
 Commit:    236713b0b7

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.101\

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  1.1.11 [C:\Program Files\dotnet\sdk]
  2.2.101 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

仍然没有 .NET Core 2.2 在目标框架下拉列表中。当前只有两个选项: .NETCoreApp 1.0 .NETCoreApp 1.1

Still, there are no .NET Core 2.2 in the Target Framework dropdown. There are only two options currently: .NETCoreApp 1.0 and .NETCoreApp 1.1

我有Visual Studio 2017,据我从关于页面15.0.0版中可以了解到

I've got Visual Studio 2017, and as far as I can tell from the About page, version 15.0.0

推荐答案

您的Visual Studio版本不是最新的。您需要对其进行更新。

Your Visual Studio Version is not up to date. You need to update it.


安装工作负载后,Visual Studio 2017 15.9默认使用.NET Core 2.1 SDK。

Visual Studio 2017 15.9 uses .NET Core 2.1 SDK by default after the workload is installed.

要更新Visual Studio以使用.NET Core 2.2 SDK:

To update Visual Studio to use .NET Core 2.2 SDK:

安装.NET Core 2.2 SDK。

Install the .NET Core 2.2 SDK.

参考

PS:您需要重新启动Visual Studio。安装.Net Core 2.2 SDK之后。

PS: You need to restart visual studio. After you the installation of .Net Core 2.2 SDK.

这篇关于Visual Studio在目标框架下拉列表中不显示.NET Core 2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆