简体   繁体   English

.Net Core 2.0 与.Net Core 2.1 兼容

[英].Net Core 2.0 compatible with .Net Core 2.1

I am new to.Net Core 2.X.我是.Net Core 2.X 的新手。 I was writing some authentication related code in controller.And I wrote the business logic in.Net Framework 4.6 class library.我在 controller 中编写了一些与身份验证相关的代码。我在.Net Framework 4.6 class 库中编写了业务逻辑。 When I tried referencing the.Net Framework library, my.Net Core 2.1 project started loosing all of the system, Linq references.当我尝试引用 .Net Framework 库时,my.Net Core 2.1 项目开始丢失所有系统,Linq 引用。

Then I created took a.Net Core 2.0 class library project.然后我创建了一个.Net Core 2.0 class 库项目。 And when I reference it, the same happens.当我引用它时,也会发生同样的情况。 I could get more information or anything.我可以获得更多信息或任何东西。

Below is the image when I referenced.Net Framework 4.6/.Net Core 2.1 proejcts.下面是我引用.Net Framework 4.6/.Net Core 2.1 项目时的图像。 Could anyone please tell me the reason and fix for this.谁能告诉我原因并解决这个问题。

在此处输入图像描述

Thanks in advance提前致谢

.Net Framework and.Net Core are fundamentally different enviroments, and while the for the programmer for the biggerst part everything looks the same under the hood it is not. .Net Framework 和 .Net Core 是根本不同的环境,虽然对于程序员来说,最重要的部分看起来一切都一样,但实际上并非如此。 While you can expect mose code to seamlessly be ported over to.Net Core, references and some NuGet packages wont work.虽然您可以期望将 mose 代码无缝移植到 .Net Core,但引用和一些 NuGet 包将不起作用。 Especially refering to.Net Framework specific assemblies which dont exist in.Net Core wont work.特别是参考.Net Core 中不存在的.Net Framework 特定程序集将不起作用。

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

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