I looked for this question in here but I didn't find the answer.
I have a Class Library project targeting .NET Core 2.0 and a WPF project targeting .NET Full Framework 4.7. I can't reference the class library on the WPF project. I get the following error:
Project 'xxxxxxxx' targets '.NETCoreApp,Version=v2.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7'.
Is there any way to reference a .NET Core project in a Full Framework one?
NET dll directly (and of course still enjoy the benefits of intellisense), basically the same thing as doing Project > Add Reference > Browse in Visual Studio. And that's it! You can still use the GUI in Visual Studio, so this post is targeted more towards devs that either edit the csproj by hand or build for .
In Visual Studio 2017.3, you can reference the Full . NET Framework (any version) directly from within a . NetCore2 project.
Add Class Library Reference To use a class library in your application, you must add a reference to the library to access its functionality. Right click on the project name of your console app in Solution Explorer and select Add ->Reference option.
You can do it through Visual Studio UI: right click on Dependencies->Add reference->Browse and select your external . dll . then just remove \bin folder an rebuild the project. It should fix the issue.
You cannot add a reference to a .NET Core project to a .NET Framework project.
To share code between .NET Core and .NET Framework apps / libraries, the shared project must target .NET Standard. If you create a .NET Standard 2.0 project, it can be used in .NET Framework 4.6.1+ projects and .NET Core 2.0+ projects.
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