I am currently working with a new C# .NET 5 Blazor Project. As we "upgraded" our Application from an .NET 4 Framework (new project using old code) I am currently running into one issue i am not able find any solution.
The issue: I wrote code using a 3rd party assembly. This 3rd Party assembly with the latest version to get is targeting .NET 4.8. Now this 3rd Party assembly is throwing exceptions due to accessing parts of the AppDomain which are not present anymore in the .NET 5 Framework (AppDomain.CurrentDomain.SetupInformation.ConfigurationFile). As microsoft removed or changed the way of how AppDomains are used now in .NET 5.
Now my question is. Is there any way to get the 3rd party assembly still loaded that it targets and uses the .NET Framework 4.8 instead of the main projects .NET 5 Framework ? Tho that I am still able to use it (no exception should be thrown as the AppDomain code is present in the .NET 4.x), without having to wait for the company to adapt the assembly to support .NET 5 ?
I tried using the "AssemblyLoadContext" but had no success till now.
Thank You for any Information or Help! Stay Safe!