即使使用的是.Net Core 3.1,我也可以更新到.Net 5 NuGet软件包吗? [英] Can I update to .Net 5 NuGet packages even if I'm using .Net Core 3.1?

查看:63
本文介绍了即使使用的是.Net Core 3.1,我也可以更新到.Net 5 NuGet软件包吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找有关我的项目库的NuGet更新.我看到有很多Microsoft库更新到v5.0.0.

I was looking for some NuGet updates about my project libraries. I see that there are a lot of Microsoft libraries update to v5.0.0.

根据我的知识,我认为这些是.Net 5.0发行的新依赖项,我不确定是否可以使用.Net Core 3.1项目将这些库更新为最新版本.

Based on my knowledge I think these are new dependencies released with .Net 5.0 and I'm not sure that I can update these libraries to latest version using .Net Core 3.1 project.

即使我正在使用/构建.Net Core 3.1项目,我也可以更新到v5.0.0库吗?

Can I update to v5.0.0 libraries even if I'm using/building a .Net Core 3.1 project?

推荐答案

不幸的是,您无法将许多这些最新的Nuget软件包更新为5.0.原因是最新的Nuget软件包版本主要是为.NET 5编写的,并且由于API的不同,通常Nuget软件包管理器有时甚至会阻止您安装它们.话虽如此,可能会有几个地方可以进行安装,但是如果您打算将应用程序保留在.NET Core 3.1上,我不建议这样做.最有可能导致某些难以调试的不一致.谨慎操作,或将项目升级到.NET 5.

Unfortunately, you cannot update many of these newest Nuget packages to 5.0. The reason being is that the newest Nuget package versions are written primarily for .NET 5, and often times Nuget Package Manager will even prevent you from installing them since there are differences in the APIs. With that said, there may be a few spots where it will allow the installation, but I wouldn't recommend it if you plan to keep the application on .NET Core 3.1. Most likely it could cause some inconsistencies that would be hard to debug. Proceed with caution, or upgrade your projects to .NET 5.

这篇关于即使使用的是.Net Core 3.1,我也可以更新到.Net 5 NuGet软件包吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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