Add unsafe dll load option

ilmerging assemblies somehow ignores the loadFromRemoteSources app
setting, so allow the compiler (user) to specify that the main app
should ignore those security checks.
This commit is contained in:
Kurt 2018-05-15 20:16:57 -07:00
parent 5f2f295541
commit 2b9a105e36

View file

@ -21,7 +21,11 @@ namespace PKHeX.WinForms
}
private static IEnumerable<Assembly> GetAssemblies(IEnumerable<string> dllFileNames)
{
return dllFileNames.Select(AssemblyName.GetAssemblyName).Select(Assembly.Load);
#if UNSAFEDLL
return dllFileNames.Select(Assembly.UnsafeLoadFrom);
#else
return dllFileNames.Select(Assembly.LoadFrom);
#endif
}
private static IEnumerable<Type> GetPluginsOfType<T>(IEnumerable<Assembly> assemblies)
{