引用ASP.NET Core中的现有.NET Framework项目

时间:2022-12-21 05:37:15

I have an existing project with .NET framework 4 its a business logic layer

我有一个.NET Framework 4的现有项目,它是一个业务逻辑层

I have created .NET core app with core framework and try to add exist business layer as reference and I tried with this example : How do I reference a .NET Framework project in a .NET Core project?

我创建了带有核心框架的.NET核心应用程序,并尝试添加存在的业务层作为参考,我尝试使用此示例:如何在.NET Core项目中引用.NET Framework项目?

I also created core app with .net framework and try to add reference its also not work

我还使用.net框架创建了核心应用程序并尝试添加引用它也无法正常工作

please check the below images and give me help :)

请检查下面的图像,并给我帮助:)

---------  .net framework 

引用ASP.NET Core中的现有.NET Framework项目

------ core project 

引用ASP.NET Core中的现有.NET Framework项目

引用ASP.NET Core中的现有.NET Framework项目

2 个解决方案

#1


1  

According to the chart on this page: https://docs.microsoft.com/en-us/dotnet/articles/standard/library you need to upgrade your libraries to at least version 4.5 of the Framework.

根据此页面上的图表:https://docs.microsoft.com/en-us/dotnet/articles/standard/library您需要将库升级到至少4.5版本的Framework。

I'm currently using version 4.6 of the Framework for my libraries and referencing them from an Asp.Net Core MVC Web Project without issue.

我目前正在使用我的库的Framework 4.6版本,并从Asp.Net Core MVC Web项目中引用它们而没有问题。

You may find these links helpful as well:

您可能会发现这些链接也很有用:

#2


0  

I got solution when u add the reference to .net framework core project you need to click restore packages button :)

当你添加对.net框架核心项目的引用时,我需要点击恢复包按钮:)

and .net core frame work project can not add the .net framework project reference

和.net核心框架工作项目无法添加.net框架项目参考

引用ASP.NET Core中的现有.NET Framework项目

#1


1  

According to the chart on this page: https://docs.microsoft.com/en-us/dotnet/articles/standard/library you need to upgrade your libraries to at least version 4.5 of the Framework.

根据此页面上的图表:https://docs.microsoft.com/en-us/dotnet/articles/standard/library您需要将库升级到至少4.5版本的Framework。

I'm currently using version 4.6 of the Framework for my libraries and referencing them from an Asp.Net Core MVC Web Project without issue.

我目前正在使用我的库的Framework 4.6版本,并从Asp.Net Core MVC Web项目中引用它们而没有问题。

You may find these links helpful as well:

您可能会发现这些链接也很有用:

#2


0  

I got solution when u add the reference to .net framework core project you need to click restore packages button :)

当你添加对.net框架核心项目的引用时,我需要点击恢复包按钮:)

and .net core frame work project can not add the .net framework project reference

和.net核心框架工作项目无法添加.net框架项目参考

引用ASP.NET Core中的现有.NET Framework项目