.NET6 vs .NET Core 3.1兼容性
有一个.net6应用程序可以安全地引用.NET Core 3.1 Nuget库吗?
我使用简单的控制台应用程序测试了此情况。一切看起来都不错,没有错误/警告。但是,我没有找到任何特定信息,因此更喜欢确保。
这很重要,因为我的一个提供商之一仅提供.NET Core 3.1 Nuget软件包。知道公司需要一年左右的时间来准备.NET6 / .NETSTANDARD版本。
Is it safe to have a .NET6 application which references a .NET Core 3.1 NuGet library?
I tested this case using a simple console application. Everything looks good and there are no errors/warning. However, I haven't found any specific information so prefer to make sure.
This is important, as one of my providers offers only a .NET Core 3.1 NuGet package. Knowing the company it'll take them a year or so to prepare a .NET6 / .NETStandard version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为.NET 6应用程序的一部分,您的.NET Core 3.1库很有可能在没有任何兼容性问题的情况下运行。
引用.NET基本原理文章会影响兼容性的变化( )强调我的):
但是,不能保证兼容性。文章继续说:
此外,在回答问题 .net运行时团队的成员说:
破坏可能可能会影响您.NET Core 3.1库的兼容性的变化是记录在。net 5 和 .net 6 。
但是,如果您没有在.NET Core 3.1库中遇到任何问题,则似乎没有任何记录的兼容性问题适用。
最终,当然,当您的供应商提供了.NET 6的供应商时,您将对图书馆具有更高的信心。
最后,随着.NET 5的介绍,就会变成a 更少对.net标准的需求:
There is a good chance that your .NET Core 3.1 library will run without any compatibility problems as part of your .NET 6 application.
Quoting the .NET fundamentals article Changes that affect compatibility (emphasis mine):
However, compatibility is not guaranteed. The article goes on to say:
Furthermore, in an answer to the question Clarification on backwards compatibility of .NET Core, a member of the .NET runtime team says:
Breaking changes that could potentially affect the compatibility of your .NET Core 3.1 library are those that are documented for .NET 5 and .NET 6.
But, if you are not experiencing any problems with your .NET Core 3.1 library, it would appear that none of the documented compatibility problems apply.
Ultimately, of course, you'll have a higher degree of confidence in the library when your vendor provides one that has been updated for .NET 6.
Finally, with the introduction of .NET 5, there became a lesser need for .NET Standard: