无法安装.NET Standard 2.0

编程入门 行业动态 更新时间:2024-10-10 01:26:11
本文介绍了无法安装.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:

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

www.microsoft/ net / learn / get-started / windows?utm_expid = .- Fmi9Q05Ry2oXQgdtPElHw.0& utm_referrer = http%3A%2F%2Fwww.talkingdotnet%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

本文发布于:2023-11-11 08:24:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577877.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NET   Standard

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!