mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: Don't load Radarr.Core.dll as part of Radarr.Update
This commit is contained in:
parent
2a15113a74
commit
9fe978319e
@ -40,8 +40,10 @@ protected ContainerBuilderBase(IStartupContext args, List<string> assemblies)
|
||||
_loadedTypes.AddRange(AssemblyLoadContext.Default.LoadFromAssemblyPath(Path.Combine(_startupPath, $"{assemblyName}.dll")).GetTypes());
|
||||
}
|
||||
|
||||
var toRegisterResolver = new List<string> { "System.Data.SQLite" };
|
||||
toRegisterResolver.AddRange(assemblies.Intersect(new [] { "Radarr.Core" }));
|
||||
RegisterNativeResolver(toRegisterResolver);
|
||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ContainerResolveEventHandler);
|
||||
RegisterNativeResolver(new [] {"System.Data.SQLite.dll", "Radarr.Core.dll"});
|
||||
#endif
|
||||
|
||||
Container = new Container(new TinyIoCContainer(), _loadedTypes);
|
||||
@ -70,7 +72,7 @@ public static void RegisterNativeResolver(IEnumerable<string> assemblyNames)
|
||||
foreach (var name in assemblyNames)
|
||||
{
|
||||
var assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(
|
||||
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, name)
|
||||
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"{name}.dll")
|
||||
);
|
||||
|
||||
try
|
||||
|
@ -143,7 +143,7 @@ private void SetupAutoMoqer(IUnityContainer container)
|
||||
AddTheAutoMockingContainerExtensionToTheContainer(container);
|
||||
|
||||
#if NETCOREAPP3_0
|
||||
ContainerBuilderBase.RegisterNativeResolver(new [] {"System.Data.SQLite.dll", "Radarr.Core.dll"});
|
||||
ContainerBuilderBase.RegisterNativeResolver(new [] {"System.Data.SQLite", "Radarr.Core"});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user