简体   繁体   English

将.Net Standard 2.0 迁移到.Net Core 2.2

[英]Migrate .Net Standard 2.0 to .Net Core 2.2

I am working in an Web API project build using.Net Core 2.2.我正在使用.Net Core 2.2 构建 Web API 项目。 A couple of libraries were develop using.Net Standard 2.0.使用.Net Standard 2.0 开发了几个库。 This is causing some incompatibilities issues with new.Net Core 2.2 libraries.这会导致新的.Net Core 2.2 库出现一些不兼容问题。

在此处输入图像描述

Is there a way to reference between those two.Net Standard libraries and.Net Core ones?有没有办法在这两个 .Net 标准库和 .Net Core 库之间进行引用?

Or how to convert/ migrate from.Net Standard libraries and.Net Core ones?或者如何从 .Net 标准库和 .Net Core 库转换/迁移?

One of your project is targeted to .NET Core 2.2, and it is being used by other project that has .NET Standard 2.0 target.您的一个项目针对 .NET Core 2.2,并且它正被具有 .NET 标准 2.0 目标的其他项目使用。 Please check the target of those projects.请检查这些项目的目标。

Any .NET Core 2.2 project can't be used or referenced by .NET Standard projects. .NET Core 2.2 项目不能被 .NET 标准项目使用或引用。 It should not be like this and I'm sure you have these incorrect reference conditions.它不应该是这样的,我相信你有这些不正确的参考条件。

The correct reference "flow" is this: any .NET Standard projects can be referenced by any .NET Core 2.x projects.正确的参考“流程”是这样的:任何 .NET Core 2.x 项目都可以参考任何 .NET 标准项目。 And this is not the other way around.而这并非相反。

Isn't .NET Standard created to be a bridge between .NET Framework and .NET Core?是不是 .NET 标准创建为 .NET 框架和 .NET 核心之间的桥梁? So you can reference .NET Standard library directly from .NET Core.所以你可以直接从 .NET Core 引用 .NET 标准库。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM