disassembled code does not compile

Explore, browse and analyze .NET assemblies

disassembled code does not compile

Postby zacky » Mon Nov 22, 2010 3:11 pm

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'
Posts: 1
Joined: Mon Nov 22, 2010 11:31 am

Not really the design of Reflector

Postby haleyjason » Thu Nov 25, 2010 4:02 pm

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 :)
Posts: 78
Joined: Sat Oct 25, 2008 4:34 pm
Location: Seattle, WA

Return to .Net Reflector 6.x and .NET Reflector 6.x Pro

Who is online

Users browsing this forum: No registered users and 0 guests