Running on Windows, does a .NET Core process support in process side by side execution of .NET 4 as described here: https://learn.microsoft.com/en-us/dotnet/framework/deployment/in-process-side-by-side-execution
Thanks
Running on Windows, does a .NET Core process support in process side by side execution of .NET 4 as described here: https://learn.microsoft.com/en-us/dotnet/framework/deployment/in-process-side-by-side-execution
Thanks
Copyright © 2021 Jogjafile Inc.
If you are seeking "side-by-side" as per the referenced docs:
Then the answer is No.
.NET Core is an independent framework, not an upgrade of .NET Framework. So running both DLLs in one process side-by-side for the above reasons is not relevant.
Yes.
I have seen two kinds of possible ways:
w3wp.exe
When using in-process hosting, it is possible to load both CLR and CoreCLR into
w3wp.exe, but how this works I don't know. It should be a low level / runtime level thing that is outside the world of managed code.DLL reference
A .NET Core application can directly reference a .NET Framework library as long as the targeting .NET Framework version implements .NET Standard. e.g. NET45+.
However, the .NET Framework code can perform differently when they are in .NET Core shell than they are in .NET Framework shell.
Consider this code:
If you reference this type in a .NET Core app, you could see a warning but no compile time error:
When you run the code, you will get an exception:
Conversely, when you run the code in a .NET Framework shell, you see normal output:
Why?
This is because
AppDomainis type forwarded to different runtime libraries.If you print out the assembly where the type resides:
You could see for .NET Core, the output is:
whereas for .NET Framework, the output is:
According to this docs, app domains and remoting are not supported by .NET Core, so you can't do cross-domain communication based on those technologies.
If you look at the implementation of
MarshalByRefObjectin .NET Core, it only throws exceptions.However, network based communications (such as gRPC) are still possible.