1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

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

This commit is contained in:
ta264 2019-10-15 21:45:41 +01:00 committed by Qstick
parent 2a15113a74
commit 9fe978319e
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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
}