Fixed: Don't load Radarr.Core.dll as part of Radarr.Update

pull/3843/head
ta264 5 years ago committed by Qstick
parent 2a15113a74
commit 9fe978319e

@ -40,8 +40,10 @@ namespace NzbDrone.Common.Composition
_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 @@ namespace NzbDrone.Common.Composition
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 @@ namespace NzbDrone.Test.Common.AutoMoq
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…
Cancel
Save