无法安装.NET Standard 2.0 [英] Can't get .NET Standard 2.0 installed

查看:636
本文介绍了无法安装.NET Standard 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建.NET Standard 2.0项目,但是在项目属性页上,它仅具有.NET Standard 1.6以下的选项。我去了Visual Studio>工具>扩展和更新>更新>产品更新并将Visual Studio 2017升级到最新版本(15.5.4。)

I'm trying to create a .NET Standard 2.0 project, however on the project properties page it only has options up to .NET Standard 1.6. I went to Visual Studio > Tools > Extensions and Updates > Updates > Product Updates and upgraded Visual Studio 2017 to the latest version (15.5.4.)

我还下载了/从这两个网址都安装了.Net Core 2.0 SDK:

I also downloaded / installed the .Net Core 2.0 SDKs from both of these urls:

https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download .md

https://www.microsoft.com/ net / learn / get-started / windows?utm_expid = .- Fmi9Q05Ry2oXQgdtPElHw.0& utm_referrer = http%3A%2F%2Fwww.talkingdotnet.com%2Fwhats-new-in-net-standard-2%2F#windowscmd

为了很好,我什至重启了,但仍然没有.NET Standard 2.0选项。

For good measure I even rebooted, yet still no .NET Standard 2.0 option. What gives?


C:\WINDOWS\system32> dotnet --info .NET命令行工具(2.1.4)

C:\WINDOWS\system32>dotnet --info .NET Command Line Tools (2.1.4)

产品信息:版本:2.1.4提交SHA-1哈希:
5e8add2190

Product Information: Version: 2.1.4 Commit SHA-1 hash: 5e8add2190

运行时环境:操作系统名称:Windows操作系统版本:10.0.16299
操作系统平台:Windows RID:win10-x64基本路径:C:\Program
Files\dotnet\sdk\2.1.4\

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

Microsoft .NET Core共享框架主机

Microsoft .NET Core Shared Framework Host

版本:2.0.5构建:
17373eb129b3b05aa18ece963f8795d65ef8ea54

Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54


推荐答案

事实证明有人在我们的存储库根目录中放置了一个global.json文件,将SDK硬编码为1.x预览版本。一旦将其更新为2.1.4,我就开始获得.NET Standard 2.0项目选项!

It turns out that someone had put a global.json file at the root of our repo that was hard-coding the SDK to a 1.x preview version. Once I updated that to 2.1.4, I started getting the .NET Standard 2.0 project option!

这篇关于无法安装.NET Standard 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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