cecil
cecil copied to clipboard
Changing TypeDefinition name does not update name_cache
TypeDefinitionColleciton.name_cache keeps old namespace and name key. This causes errors when trying to export another assembly where TypeReferences were appriopriately renamed as well - resolving TypeReference to TypeDefinition fails.
Example:
// LibA.dll
public enum Foo { A }
// LibB.dll (references LibA)
public void Bar(Foo x = Foo.A) { }
Eurk, good catch. Thanks for filing this.