referencing .NET framework 4 dll in .NET core 2.0

You cannot do this.

.NET Core can reference a .NET Standard DLL
.NET Framework can reference a .NET Standard DLL

.NET Core cannot reference a .NET Framework DLL (or visa versa).

If you have for example a .NET Standard Project, you cannot reference .NET Framework and the .NET Core framework.
It's one or the other.

enter image description here

To further elaborate on this, we have a project that has shared BusinessLogic, that project is a .NET Standard 2.0 Library.
We reference that project in 2 other projects a.NET Core 2.1 and a .NET Framework 4.7.

Things go wrong when you reference .NET Core or .NET Framework items directly to that shared .NET Standard library.

Tags:

C#

Dll

.Net Core