使用targetFramework生成Nuget =; netcore5.0"在.net5 c#项目中使用它

发布于 2025-01-28 08:05:19 字数 104 浏览 2 评论 0原文

我有以下错误: NU1202:软件包XXX与Net5.0(.netCoreApp,version = v5.0)不兼容。软件包XXX支持:NetCore50(.netcore,版本= V5.0)

I am getting following error:
NU1202: Package xxx is not compatible with net5.0 (.NETCoreApp,Version=v5.0). Package xxx supports: netcore50 (.NETCore,Version=v5.0)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滴情不沾 2025-02-04 08:05:19

不幸的是,.netCore.netCoreApp不是同一回事。 nuget在目标框架上的文档 是“ Windows Store”。我不确定这是否与UWP相同,尽管在文档中确实说uap可以使用netcore

无论如何,.NET 5的规范目标框架标识符是.netCoreApp(与早期的.NET内核相同,1.0至3.1),这是不同的。

这只是一个不幸的名字选择,导致不必要的混乱,但这是我们到达这里的历史。

简而言之,您的.NET 5项目无法使用为UWP设计的软件包。

Unfortunately, .NETCore and .NETCoreApp are not the same thing. NuGet's docs on target frameworks says that .NETCore is "Windows Store". I'm not sure if that's the same thing as UWP, although in the doc it does say that uap can use netcore.

Anyway, .NET 5's canonical target framework identifier is .NETCoreApp (same as all the earlier .NET Cores, 1.0 to 3.1), which is different.

It's all just an unfortunate choice in names that leads to unnecessary confusion, but it's the history of how we got here.

In short, your .NET 5 project can't use packages designed for UWP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文