Hotfixes bad IL image
This commit is contained in:
parent
4b497372e0
commit
0140eb73b4
1 changed files with 11 additions and 1 deletions
|
|
@ -37,7 +37,17 @@ namespace Server
|
|||
|
||||
public static void LoadScripts(string path = null) =>
|
||||
Assemblies = Directory.GetFiles(path ?? AssembliesPath, "*.dll")
|
||||
.Select(t => AssemblyLoadContext.Default.LoadFromAssemblyPath(t)).ToArray();
|
||||
.Select(t =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return AssemblyLoadContext.Default.LoadFromAssemblyPath(t);
|
||||
} catch (BadImageFormatException)
|
||||
{
|
||||
// ignored
|
||||
return null;
|
||||
}
|
||||
}).Where(t => t != null).ToArray();
|
||||
|
||||
public static void Invoke(string method)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue