简体   繁体   English

如何更新到.NETStandard 2.0 NuGet包

[英]How to update to .NETStandard 2.0 NuGet Package

I've a good old .NET Framework 4.7 Class Library in Visual Studio 2015 currently using Microsoft.Extensions.Configuration NuGet package version 1.1.2 . 我在Visual Studio 2015中有一个很好的旧.NET Framework 4.7 类库 ,目前使用的是Microsoft.Extensions.Configuration NuGet包版本1.1.2 I'm trying to update this to version 2.0 , but I'm getting this error: 我正在尝试将此更新到2.0版 ,但我收到此错误:

Microsoft.Extensions.Configuration 2.0.0'. Microsoft.Extensions.Configuration 2.0.0'。 You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. 您正在尝试将此软件包安装到以“.NETFramework,Version = v4.7”为目标的项目中,但该软件包不包含任何与该框架兼容的程序集引用或内容文件。 For more information, contact the package author. 有关更多信息,请与软件包作者联系。

I see that the new version only supports .NETStandard 2.0 . 我看到新版本仅支持.NETStandard 2.0 Do I have to convert all my project to either .NET Core or .NET Standard in Visual Studio 2017 ? 我是否必须将所有项目转换为Visual Studio 2017中的 .NET Core.NET Standard

.NET Framework versions 4.6.1 and higher do support .NET Standard 2.0+, but only when using new tooling. .NET Framework 4.6.1及更高版本支持.NET Standard 2.0+,但仅限于使用新工具时。 Make sure you update to VS 2017 version 15.3.0 or higher and have the .NET Core SDK 2.0.0 installed and no global.json in your solution's directory hierarchy pinning a lower SDK version. 确保您更新到VS 2017版本15.3.0或更高版本并安装了.NET Core SDK 2.0.0,并且解决方案的目录层次结构中没有global.json固定较低的SDK版本。

You may also need to install the .NET Core workload in VS 2017 您可能还需要在VS 2017中安装.NET Core工作负载

Yes you have to convert your project to .Net standard 2.0 to use the Microsoft.Extensions.Configuration 2.0.0 package. 是的,您必须将项目转换为.Net标准2.0才能使用Microsoft.Extensions.Configuration 2.0.0软件包。

Check out the below link for .Net standard 2.0 supported .Net framework version as of now the, .Net standard 2.0 supports only up to .Net framework 4.6.1 查看.Net标准2.0支持的.Net框架版本的以下链接,截至目前,.Net标准2.0仅支持.Net框架4.6.1

.Net standard 2.0 supported api .Net标准2.0支持api

暂无
暂无

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

相关问题 如何创建.netstandard nuget包? - How to create .netstandard nuget package? 在不同的 netstandard2.0 库 NU1202 中安装 netstandard2.0 Nuget 包 - Installing a netstandard2.0 Nuget Package inside a different netstandard2.0 library NU1202 nuget 包中 .netstandard2.0 和 .netframework47 DLL 的混合 - .netstandard 不可用 - Mix of .netstandard2.0 and .netframework47 DLLs in nuget package - .netstandard not available 将 .NetStandard 2.0 Nuget 包安装到 VS2015 Net 4.6.1 项目中 - Installing a .NetStandard 2.0 Nuget package into a VS2015 Net 4.6.1 project 有什么方法可以使用 .netstandard2.0 或 .netstandard3.0 将 .NETFramework 4.7.1 nuget 安装到项目中 - Is there any way we can install .NETFramework 4.7.1 nuget into project using .netstandard2.0 or .netstandard3.0 如何解决 Framework 4.8 使用的 NetStandard 2.0 库中的 package 参考问题? - How to resolve package reference issue in NetStandard 2.0 library used by Framework 4.8? 有没有办法确定 NuGet 包针对的是哪个版本的 .Netstandard? - Is there a way to determine which version of .Netstandard is targeted by a NuGet package? 增加Nuget包版本NetStandard本地文件夹视觉工作室2017 - Increment Nuget Package Version NetStandard Local Folder visual studio 2017 .NETStandard库nuget软件包-无法安装在标准项目上 - .NETStandard Library nuget package - cannot install on standard project Visual Studio Nuget Manager报告自定义Nuget的.NETStandard2.0部分“不支持” - Visual Studio Nuget Manager reports “unsupported” for the .NETStandard2.0 section of a custom Nuget
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM