Lotfi
unread,Mar 15, 2009, 6:29:05 AM3/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mono-cecil
Hy Jb,
Its seams that a removing a nested type from an assembly using Cecil
leads to corrupted metadata. Consider the simple following case :
class Class1
{
class Class2
{ }
}
Removing the class "Class1/Class2" would cause the metadata to be
corrupted !
AssemblyDefinition ad = AssemblyFactory.GetAssembly("CecilTest.exe");
ad.MainModule.Types.Remove(ad.MainModule.Types["Class1/Class2"]);
AssemblyFactory.SaveAssembly(ad, "CecilTest2.exe");
PEVerify prints :
[MD]: Error (Structural): Table=0x00000029, Col=0x00000000,
Row=0x00000001, has rid out of range.
Please help !