I found lots of posts about referencing a .NET Core project from 4.6.1, but I'm getting an error simply referencing a .NET Core 1.1 DLL directly from a 4.6.1 Winforms app. Strangely, it compiles fine, but gets this runtime error:
"Could not load file or assembly 'System.Runtime, Version=4.1.0.0...."
The 4.6.1 app runs fine until it gets to the class that's using the referenced assembly, then throws this error (doesn't even run that class's constructor).
My main requirement is that the .NET Core DLL needs to be cross-platform - it needs to run in Ubuntu.
The core DLL's project.json in its entirety:
{ "version": "1.0.0-*",
"dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.1.0" },
"frameworks": { "netcoreapp1.1": { } } }
I'm not sure why this is happening - the core DLL is not referencing anything other than core - why does it make my 4.6.1 app start looking for System.Runtime? That's a framework assembly. And if it's something about the configuration of the Core DLL, why wouldn't it be a compile-time error?
Any help is much appreciated.
- Buzz