Friday, February 24, 2006

Fix: "Failed to open meta data" in ildasm.exe

This issue is pretty easy to come up with a fix for using a Google search, but I thought I'd note it here anyway.

If you get the error message "error : Failed to open meta data" when trying to open a file with ildasm.exe (Microsoft's .Net intermediate language (IL) disassembler), check to make sure that the ildasm version you are using matches the .Net version that the target file was built with. I encountered this problem when I was trying to run ildasm from the command line targetting a .Net 2.0 assembly, but the first instance of ildasm.exe on my path was the 1.1 version.

3 comments:

  1. hey, thanks for your tip, I have Vis Studio 2003 and 2005 installed on my machine and I was unknowingly trying to disassemble an interop built with 05 using an 03 ildasm. Your tip solved my problem instantly. Ta. Sammy

    ReplyDelete
  2. Thanks for this. Google pointed me here and it was exactly my issue.
    Next round on me :)

    ReplyDelete
  3. delete archive ildasm.exe.config

    ReplyDelete

Non-spammers: Thanks for visiting! Please go ahead and leave a comment; I read them all!

Attention SPAMMERS: I review all comments before they get posted, and I REPORT 100% of spam comments to Google as spam! Why not avoid getting your account banned as quickly -- and save us both a little time -- by skipping this comment form and moving on to the next one on your list? Thanks, and I hope you have a great day!