我应该如何处理 Visual Studio 2017 中不稳定的包,错误:已使用 '.NETFramework,Version=v4.6.1' 而不是目标框架恢复 [英] What should I do about unstable packages in Visual Studio 2017, error: was restored using '.NETFramework,Version=v4.6.1' instead of target framework

查看:90
本文介绍了我应该如何处理 Visual Studio 2017 中不稳定的包,错误:已使用 '.NETFramework,Version=v4.6.1' 而不是目标框架恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 制作应用程序.它适用于 Android,我试图让它在 iOS 上工作,但我需要在我的依赖项中解决这个不稳定的包.关于我应该做什么的任何建议?

I'm using Visual Studio to make an app. It works on Android and I'm trying to get it to work on iOS, but I need to resolve this unstable package in my dependencies. Any advice about what I should do?

错误信息:

使用.NETFramework,Version=v4.6.1"而不是项目目标框架.NETStandard,Version=v2.0"还原了包OxyPlot.Xamarin.Forms 1.1.0-unstable0011".此软件包可能与您的项目不完全兼容.

Package 'OxyPlot.Xamarin.Forms 1.1.0-unstable0011' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework'.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

推荐答案

这是一条警告消息,而不是一条错误消息,这是设计使然.

That's a warning message, not an error message, and this is by design.

请参阅https://docs.microsoft.com/en-us/nuget/reference/target-frameworks 用于目标框架信息.

Please refer to https://docs.microsoft.com/en-us/nuget/reference/target-frameworks for target framework information.

.NET Standard 2.0 和 .NET 4.6.1 具有巨大的表面积重叠.为此,Visual Studio 和 NuGet 添加了回退框架的概念,当用户尝试在 .NET Framework 项目中安装 .NET Standard 包时,它将允许安装但警告用户它不是 100% 兼容并且在某些情况下这可能不起作用.

.NET Standard 2.0 and .NET 4.6.1 have a huge surface area overlap. For this Visual Studio and NuGet have added the concept of a fallback framework, where when a user tries to install a .NET Standard package in a .NET Framework project, it will allow the installation but warn the user that it's not 100% compatible and that there may be certain cases in which this does not work.

相关https://github.com/NuGet/Home/issues/5192https://github.com/NuGet/Home/wiki/Enable-.NET-Core-2.0-projects-to-work-with-.NET-Framework-4.6.1-compatible-packages

这篇关于我应该如何处理 Visual Studio 2017 中不稳定的包,错误:已使用 '.NETFramework,Version=v4.6.1' 而不是目标框架恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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