Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bug in Removing Nested Types
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Lotfi  
View profile  
 More options Mar 15 2009, 6:29 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jb Evain  
View profile  
 More options Mar 15 2009, 8:03 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lotfi Gheribi  
View profile  
 More options Mar 15 2009, 8:23 am
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
Works great, thanks !

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »