I used .NET Reflector to disassemble a third party dll(so i don't have the original code). From the generated C# code i created a solution in VS 2008. I was surprised with the kind of compile errors when i tried to compile, what makes me think that there is a flaw in .Net Reflector. Here are some compile errors found.

'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

'decimal.operator --(decimal)': cannot explicitly call operator or accessor

'System.Collections.IEnumerator': type used in a using statement must be implicitly convertible to 'System.IDisposable'

Cannot apply indexing with [] to an expression of type 'int'
zacky
0

Comments

1 comment

  • haleyjason
    Reflector wasn't really designed to create a vs.net project from an assembly ... all the saving logic has been added on over the years and is just a nice addition - not really what it was designed to do. Viewing the code in an easy to navigate format is what it is REALLY good at.

    Most of the creating of a vs.net project logic is old and not working so well as you found out. There are at least 2 addins that do it to different degrees of success. Not much you can do except fix the errors or write your own addin that will do it better ... then please let us all know about it so we can use it too :)
    haleyjason
    0

Add comment

Please sign in to leave a comment.