Handle case where asm resolver returns a later version
This commit is contained in:
parent
52c3c160cd
commit
51fc70169d
|
@ -64,9 +64,20 @@ namespace de4dot.renamer {
|
||||||
Log.w("Could not load assembly {0}", asmFullName);
|
Log.w("Could not load assembly {0}", asmFullName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Log.v("Loaded assembly {0}", asmFullName);
|
if (assemblies.ContainsKey(asmDef.Name.FullName)) {
|
||||||
|
assemblies[asmFullName] = assemblies[asmDef.Name.FullName];
|
||||||
|
return assemblies[asmDef.Name.FullName];
|
||||||
|
}
|
||||||
|
|
||||||
return assemblies[asmFullName] = asm = new ExternalAssembly(asmDef);
|
if (asmFullName == asmDef.Name.FullName)
|
||||||
|
Log.v("Loaded assembly {0}", asmFullName);
|
||||||
|
else
|
||||||
|
Log.v("Loaded assembly {0} (but wanted {1})", asmDef.Name.FullName, asmFullName);
|
||||||
|
|
||||||
|
asm = new ExternalAssembly(asmDef);
|
||||||
|
assemblies[asmFullName] = asm;
|
||||||
|
assemblies[asmDef.Name.FullName] = asm;
|
||||||
|
return asm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TypeDefinition resolve(TypeReference type) {
|
public TypeDefinition resolve(TypeReference type) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user