I want to dynamically load dotnet assemblies at runtime.
Let\'s say I have netcore 3.1 console app:
.NET Standard is an interface - a versioned list of APIs that you can call.
.Net standard can be referenced by both .NET framework and .NET core.
What does this mean?
You should use .Net standard for class libraries.
.NET framework and .NET core those two target a platform. .Net framework only works on Windows while .Net core works on all three(Windows/Linux/MacOS) operating systems. These should not reference one another.
This is why .Net standard exists.
So to quickly answer your questions.
What about reverse situation, when I have dotnet framework 4.8 console app:
This is for .NET Standard. Taken from Microsoft Docs.
The documentation is very clear on what you need to pay attention to. The text below is similar to the one in the screenshot. I added here to be more readable.
The following table lists the minimum platform versions that support each .NET Standard version. That means that later versions of a listed platform also support the corresponding .NET Standard version. For example, .NET Core 2.2 supports .NET Standard 2.0 and earlier.
In addition to this ->https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support
In order to avoid targeting errors and transitive dependencies errors or at least keep them to a minimum. Change your package management to PackageReference when using .NET standard.
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
The link below provides the full info and also some troubleshooting tips for such errors.
Source: https://www.hanselman.com/blog/ReferencingNETStandardAssembliesFromBothNETCoreAndNETFramework.aspx