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
------ core project
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:
您可能会发现这些链接也很有用:
-
Step by step instruction by Scott Hanselman: http://www.hanselman.com/blog/HowToReferenceAnExistingNETFrameworkProjectInAnASPNETCore10WebApp.aspx
Scott Hanselman的逐步指导:http://www.hanselman.com/blog/HowToReferenceAnExistingNETFrameworkProjectInAnASPNETCore10WebApp.aspx
-
Explaination of Target Framework Monikers: https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers-tfms-are-about/
Target Framework Monikers的解释:https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-绰号 - TFMS-是,大约/
#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:
您可能会发现这些链接也很有用:
-
Step by step instruction by Scott Hanselman: http://www.hanselman.com/blog/HowToReferenceAnExistingNETFrameworkProjectInAnASPNETCore10WebApp.aspx
Scott Hanselman的逐步指导:http://www.hanselman.com/blog/HowToReferenceAnExistingNETFrameworkProjectInAnASPNETCore10WebApp.aspx
-
Explaination of Target Framework Monikers: https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers-tfms-are-about/
Target Framework Monikers的解释:https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-绰号 - TFMS-是,大约/