Use custom plugin assembly load context

This commit is contained in:
Patrick Barron
2023-01-15 17:35:36 -05:00
parent a48f188874
commit 577d396649
2 changed files with 34 additions and 1 deletions

View File

@@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.Plugins
Assembly assembly;
try
{
var assemblyLoadContext = new AssemblyLoadContext($"{plugin.Name} ${plugin.Version}", true);
var assemblyLoadContext = new PluginLoadContext(file);
_assemblyLoadContexts.Add(assemblyLoadContext);
assembly = assemblyLoadContext.LoadFromAssemblyPath(file);