Using VisualStudio 2019.
There are 3 assemblies:
.Net Framework 4.7.2
- main app.Net Standard 2.0
- common interface library.Net Core 3.1
- library that implements common interface library
Also following is true:
.Net Framework 4.7.2.
references.Net Standard 2.0
common library throughNuget
.Net Core 3.1.
references.Net Standard 2.0
common library throughNuget
(and implements it)
I am trying to create an instance of .net core 3.1
assembly and then call the method of that instance from the Framework 4.7.2
application. The Framework
app knows which interface methods to invoke.
Instance creation works fine, but then, when I try calling a method of that instance - following exception is thrown:
{"Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}
Following the advice mentioned in this thread How do you reference a netstandard project from .net project in VS2017? I have added a Nuget reference to NETStandard.Library v2.0.3
to the main .Net Framework application, but it did not resolve the issue.
is it possible to operate with .net core libraries within .net framework app domain? What am i doing wrong?