Remove FileSystem.ResolveAssemblyPath
This commit is contained in:
@@ -34,16 +34,10 @@ namespace OpenRA
|
||||
ctorCache = new Cache<Type, ConstructorInfo>(GetCtor);
|
||||
|
||||
// Allow mods to load types from the core Game assembly, and any additional assemblies they specify.
|
||||
// Assemblies can only be loaded from directories to avoid circular dependencies on package loaders.
|
||||
// Assemblies must exist in the game binary directory next to the main game executable.
|
||||
var assemblyList = new List<Assembly>() { typeof(Game).Assembly };
|
||||
foreach (var path in manifest.Assemblies)
|
||||
{
|
||||
var resolvedPath = FileSystem.FileSystem.ResolveAssemblyPath(path, manifest, mods);
|
||||
if (resolvedPath == null)
|
||||
throw new FileNotFoundException($"Assembly `{path}` not found.");
|
||||
|
||||
LoadAssembly(assemblyList, resolvedPath);
|
||||
}
|
||||
foreach (var filename in manifest.Assemblies)
|
||||
LoadAssembly(assemblyList, Path.Combine(Platform.BinDir, filename));
|
||||
|
||||
AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
|
||||
assemblies = assemblyList.SelectMany(asm => asm.GetNamespaces().Select(ns => (asm, ns))).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user