代码之家  ›  专栏  ›  技术社区  ›  Ya Wang

VS2017-缺少.net core>2.1作为目标框架

  •  2
  • Ya Wang  · 技术社区  · 8 年前

    找到解决方案!花了一段时间,安装了所有SDK和所有运行时,然后重新安装了我想要的最新版本!

    目标, 在visual studio中将netcore 2.1或更高版本作为下拉选项。我已经看过可能的重复问题了!

    在上一次将visual studio 15.7更新到15.8.4之后,目标框架列表中的.net core 2.1或更高版本已消失。

    检查下面的解决方案 (我已经在这里寻找解决方案了!) VS2017 : Target framework drop down does not show .NET Core 2.1 option

    The current .NET SDK does not support targeting .NET Core 2.1. target .NET Core 2.0 or lower or use a vs of the .NET SDK that support NET Core 2.1

    参考屏幕: enter image description here enter image description here enter image description here enter image description here

    enter image description here

    3 回复  |  直到 8 年前
        1
  •  2
  •   magicandre1981    8 年前

    用户表示 my comment fixed the issue . 所以我会把它贴出来作为答案:

    在图片上,我看到许多已安装的.Net核心SDK,可能VisualStudio对这么多已安装的SDK有一些问题。

        2
  •  22
  •   Dmitry Pavlov    7 年前

    一般来说,新的 预览版 .NET Core 2.X 出现以下错误:

    确保:

    1. downloaded dotnet --info 看看你现在在你的机器上安装了什么。

    2. 使用.NET核心SDK的预览 此处选项:

    -> Tools -> Options -> Projects and Solutions -> .NET Core

    Visual Studio 选中选项后。

    most recent Visual Studio version 安装在开发机器上(有时可能需要 preview Download Preview 链接)。

        3
  •  0
  •   Ares    8 年前

    我也有这个问题,这就是我所做的,它对我起了作用,它可能对你,也可能不对。我在2.0之后卸载了所有东西。然后我转到这个链接 https://www.microsoft.com/net/download 下载了2.1版的SDK和运行时下载,安装后我重启了笔记本电脑,启动了VS2017。然后我去尝试创建一个新的web应用MVC,并选择了netcore2.1。

    希望这有帮助

        4
  •  0
  •   alexey    7 年前

    推荐文章