I have been using ILDASM a lot for past few days when I encountered this bug. This problem is with ILDASM shipped with .NET 1.1 SDK. The problem: If you open an assembly built with .NET 2.0 and try to disassemble it, it throws error “error : Failed to open meta data” which is valid because we trying to disassemble an assembly built on 2.0 with ILDASM for 1.1. But on clicking OK button, without closing ILDASM, try to delete or rename the assembly you are trying to disassemble. You cannot...
There are some scenarios where need to check programmatically if the given file is a .NET assembly or not. How do we do that? One way is to use reflection and try to load that file (assembly). If the assembly gets loaded, and doesn’t throw any exception, then yes, it’s a valid .NET assembly. If it’s not a valid file, then it’ll throw a “BadImageFormatExcept... The idea of checking weather a file is assembly or not by loading it and checking if exception is thrown...