Friday, April 29, 2011

PEVerify MD Error: 0x8013124C

Hi

I get this 'error' when running PEVerify on a custom generated assembly.

[MD](0x8013124C): Error: Method has a duplicate, token=0x06000023. 
                         [token:0x06000021]
[MD](0x8013124C): Error: Method has a duplicate, token=0x06000021. 
                         [token:0x06000023]

Besides this (and 196 others of the exact same error), there are no issues with the metadata and IL. And it works correctly too.

I have been unable to track down where it comes from (as it does not affect assembly in any way).

Google, unfortunately does not reveal much on this error.

Can someone please provide some insight on this 'error' and how it could be caused?

Thanks :)

From stackoverflow
  • It sounds like peverify believes that you have duplicate method rows in the assembly meta data. I read in the comments that you are using Reflection.Emit to generate the assembly. It sounds like it's possible that you are re-using a method definition for generation instead of creating a new one for each method.

  • I solved the problem.

    It is caused by emitting a method with the exact signature of another.

    UPDATE

    This goes for any member. Hence, this will likely have the same MD error when run on obfuscated assemblies.

0 comments:

Post a Comment