简体   繁体   English

当前.NET SDK在Visual Studio 2017更新15.9.3中不支持定位.NET Standard 2.0错误,已安装.NET Core 2.2.1 SDK

[英]The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.9.3, .NET Core 2.2.1 SDK installed

在此处输入图片说明 在此处输入图片说明 It seems I cannot do any .NET standard 2.0 based projects after a clean install. 全新安装后,似乎无法执行任何基于.NET Standard 2.0的项目。

I am on the latest version of the .NET Framework 4.7.2, VS 2017 - 15.9.3 and .NET Core 2.2.1 我正在使用最新版本的.NET Framework 4.7.2,VS 2017-15.9.3和.NET Core 2.2.1

I have installed both the x64/x86 versions of the .NET 2.2 SDK 我已经安装了.NET 2.2 SDK的x64 / x86版本

Attached is my setup info, 附件是我的设置信息,

EDIT : Actual error when opening a solution with a .NET Standard 2.0 project inside it 编辑 :打开带有.NET Standard 2.0项目的解决方案时出现实际错误

The current .NET SDK does not support targeting .NET Standard 2.0.  Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. 
Microsoft.Extensions.HealthChecks.SqlServer 
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets    126 

EDIT2 Seems like my question confused people that answered, my specific issue is to do with some how .NET Standard 2.0 missing from my machine and nothing to do with an error a project is throwing (its throwing the error because of missing framework) EDIT2似乎我的问题使回答的人感到困惑,我的特定问题与我的计算机上缺少.NET Standard 2.0的方式有关,而与项目引发的错误无关(由于缺少框架而引发错误)

I will post a new question about this as this got focused on a specific project in my solution vs the actual error. 我将对此发布一个新的问题,因为这将重点放在解决方案中的特定项目与实际错误上。

EDIT 3 More focused question on the actual problem Missing .NET Standard 2.0 Framework with latest .NET Core SDK 2.2.1, .NET Framework 4.7.2, VS2017 15.9.3 编辑3对实际问题的更多关注的问题缺少具有最新.NET Core SDK 2.2.1,.NET Framework 4.7.2,VS2017 15.9.3的.NET Standard 2.0 Framework

closing this one 关闭这个

If you format the error you'll see it's thrown by the Microsoft.Extensions.HealthChecks.SqlServer extension which hasn't been updated for a year and doesn't look like a Microsoft extension either - it's published by a user named seven who published a bunch of packages with Microsoft prefixes about a year ago and then went silent. 如果您格式化错误,则将看到Microsoft.Extensions.HealthChecks.SqlServer扩展抛出该错误,该扩展一年未更新,并且看起来也不像Microsoft扩展-由名为7的用户发布,该用户发布了一堆带有Microsoft前缀的软件包大约在一年前,然后变得沉默了。

I'd strongly suggest removing that extension. 强烈建议删除该扩展名。 You could make it work if you installed the .NET Core runtime it needs but I wouldn't trust something that doesn't even have a link to its project page 如果安装了所需的.NET Core运行时,则可以使其工作,但我不信任甚至没有指向其项目页面的链接的东西

Update 更新

Checking the package's dependencies shows it depends on an abandoned package by the same user. 检查软件包的依赖关系显示它依赖于同一用户放弃的软件包 The source link points to a fork of the experimental HealthChecks repository that was never released. 源链接指向从未发布的实验性HealthChecks存储库的分支

As the original link shows, those analyzers were replaced by the classes in the Microsoft.AspNetCore.Diagnostics and eventually released as the official Microsoft.AspNetCore.Diagnostics.HealthChecks package, that does support .NET Standard 2.0 由于原来的链接显示,这些分析仪是由类的替代Microsoft.AspNetCore.Diagnostics和最终发布的官方Microsoft.AspNetCore.Diagnostics.HealthChecks包,这支持.NET 2.0标准

暂无
暂无

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

相关问题 当前的.NET SDK不支持以.NET Standard 2.0为目标 - The current .NET SDK does not support targeting .NET Standard 2.0 目前.NET SDK不支持针对.NET Core 2.1。 要么以 .NET Core 2.0 或更低版本为目标,要么使用支持 .NET Core 2.1 的 .NET SDK - The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a .NET SDK that supports .NET Core 2.1 当前的 .NET SDK 不支持面向 .NET Core 2.2。 以 .NET Core 2.1 或更低版本为目标 - The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower .NET Core SDK 2.2.1 和 .NET Framework 4.7.2 缺少 .NET Standard 2.0 Framework - Missing .NET Standard 2.0 Framework with .NET Core SDK 2.2.1 & .NET Framework 4.7.2 docker-compose up 失败:当前 .NET SDK 不支持面向 .NET Core 2.2 - docker-compose up failes: The current .NET SDK does not support targeting .NET Core 2.2 “当前的.net SDK不支持定位.net核心2.2” - “the current .net sdk does not supporting targeting .net core 2.2” 当前 .NET SDK 不支持针对 .NET Core 3.0 | 3.1 | 5.0 | 6.0 - The current .NET SDK does not support targeting .NET Core 3.0 | 3.1 | 5.0 | 6.0 NETSDK1045当前的.NET SDK不支持定位.NET Core 3.1。 目标.NET Core 2.2或 - NETSDK1045 The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.2 or 无效 - 错误 NETSDK1045:当前 .NET SDK 不支持定位 .NET 6.0 - None worked - Error NETSDK1045: The current .NET SDK does not support targeting .NET 6.0 如果库的目标是.NET Standard 2.0,那么我是使用Visual Studio 2017的唯一选择吗? - If a library is targeting .NET Standard 2.0 is my only option to use Visual Studio 2017?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM