public static void SetDefaultAssemblyResolver(ASSEMBLYRESOLVEFUNC func) { // https://msdn.microsoft.com/en-us/library/ff527268.aspx // ensure that we only receive events if we have an actual fallback function set if (func != null && _AssemblySolver == null) { AppDomain.CurrentDomain.AssemblyResolve += _AssemblyResolveAdapter; } if (func == null && _AssemblySolver != null) { AppDomain.CurrentDomain.AssemblyResolve -= _AssemblyResolveAdapter; } _AssemblySolver = func; }
public static void SetDefaultAssemblyResolver(ASSEMBLYRESOLVEFUNC func) { // https://msdn.microsoft.com/en-us/library/ff527268.aspx if (func != null && _AssemblySolver == null) { AssemblyLoadContext.Default.Resolving += _AssemblyResolveAdapter; } if (func == null && _AssemblySolver != null) { AssemblyLoadContext.Default.Resolving -= _AssemblyResolveAdapter; } _AssemblySolver = func; return; }
public static void SetDefaultAssemblyResolver(ASSEMBLYRESOLVEFUNC func) { throw new PlatformNotSupportedException(); }