Use .net core with legacy .net framework dlls
Difficult topic. Generally .NET Framework and .NET Core are incompatible. They target a different set of assemblies (mscorlib vs. System.Runtime) which causes incompatibilities since all usages of types are prefixed with the assembly the type is from.
Starting with .NET Core 2 (currently in preview), you can reference .NET Framework assemblies through an invisible compatibility shim. This allows you to reference the assembly and compile successfully.
It doesn't guarantee though that the application will run successfully, since .NET Core doesn't provide all the APIs from .NET Framework. You'll get PlatformNotSupportedException
or MissingTypeException
and friends at runtime if that's the case.
Building on top of Suchiman's answer, the compatibility shim will allow a .NET Core application to reference .NET Framework libraries and succeed at compile time but the .NET Core application may fail at run time if any required underlying .NET Framework libraries are missing.
To improve the chances of success at run time, you can try using the Windows Compatibility Pack. This basically attempts to fill in missing .NET Framework libraries. The downside is that the Windows Compatibility Pack is somewhat specific to Windows so it may affect the cross-platform compatibility of the .NET Core app.