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
NET Standard/. NET Core, you need to use the . NET Framework. You can now reference .
One method of adding references to your library is by typing it directly in the project. json file. As you can see that we have added some references under the dependencies section as shown in the following code. Let us now save this file and you will see that references are added to your library now.
Move Your Project File You can migrate your old project to the Core project using the 'dotnet migrate; command, which migrates the project. json and any other files that are required by the web application. The dotnet migrate command will not change your code in any way.
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.
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/
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With