Bug in Removing Nested Types
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
From: Lotfi <gheri...@gmail.com>
Date: Sun, 15 Mar 2009 03:29:05 -0700 (PDT)
Local: Sun, Mar 15 2009 6:29 am
Subject: Bug in Removing Nested Types
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 !
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Jb Evain <j...@nurv.fr>
Date: Sun, 15 Mar 2009 13:03:53 +0100
Local: Sun, Mar 15 2009 8:03 am
Subject: Re: [mono-cecil] Bug in Removing Nested Types
Hey, On 3/15/09, Lotfi <gheri...@gmail.com> wrote: AssemblyDefinition ad = AssemblyFactory.GetAssembly("CecilTest.exe"); > ad.MainModule.Types.Remove(ad.MainModule.Types["Class1/Class2"]);
You'd also have to remove the class from the NestedTypes collection of the declaring type. -- Jb Evain <j...@nurv.fr>
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Lotfi Gheribi <gheri...@gmail.com>
Date: Sun, 15 Mar 2009 13:23:39 +0100
Local: Sun, Mar 15 2009 8:23 am
Subject: Re: [mono-cecil] Re: Bug in Removing Nested Types
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|