diff options
| author | Patrick Barron <barronpm@gmail.com> | 2023-01-17 18:49:00 -0500 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2023-01-17 18:49:00 -0500 |
| commit | 79a7815be7ffaeb0c93cc38fe454b5a0bc5df3c2 (patch) | |
| tree | b1b106f0a01c39bbbf5ddb475e8abaf878e16df0 /Emby.Server.Implementations/Plugins/PluginManager.cs | |
| parent | 875359d4573cec90f4eecfe1d08671496de43675 (diff) | |
Use one AssemblyLoadContext per plugin
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index f2212f4dc..15ed08157 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -123,14 +123,14 @@ namespace Emby.Server.Implementations.Plugins continue; } + var assemblyLoadContext = new PluginLoadContext(plugin.Path); + _assemblyLoadContexts.Add(assemblyLoadContext); + foreach (var file in plugin.DllFiles) { Assembly assembly; try { - var assemblyLoadContext = new PluginLoadContext(file); - _assemblyLoadContexts.Add(assemblyLoadContext); - assembly = assemblyLoadContext.LoadFromAssemblyPath(file); // Load all required types to verify that the plugin will load |
