Reputation: 2437
I have an existing project with .NET framework 4 its a business logic layer
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?
I also created core app with .net framework and try to add reference its also not work
please check the below images and give me help :)
--------- .net framework
------ core project
Upvotes: 8
Views: 8347
Reputation: 2437
I got solution when u add the reference to .net framework core project you need to click restore packages button :)
and .net core frame work project can not add the .net framework project reference
Upvotes: 1
Reputation: 33771
According to the chart on this page: https://learn.microsoft.com/en-us/dotnet/articles/standard/library you need to upgrade your libraries to at least version 4.5 of the 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.
You may find these links helpful as well:
Step by step instruction by 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/
Upvotes: 4