I have a .NET Framework 4.6.1 console application and I am attempting to reference a .NET Core 2.0 assembly within it. Visual Studio lets me setup the reference, Intellisense seems OK with the classes and methods within the .NET Core assembly but it fails to run.
If I debug the app in Visual Studio, VS shows me this message:
The application is in break mode
Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).
If I start without debugging, I get this exception:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at MyProject.Program.Main(String[] args)
Not sure what to make of this. I think I'm looking for an answer similar to this one but updated since this question is over 2 years old and the answer is no longer relevant to the current state of .NET Core.