Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Recompile decompiled program using VS 2010 (C#)?

$
0
0

Hi,

 

I'm trying to use the IlSpy output and recompile it again (C#). Unfortunately there are a heap of issues related to things that VS and IlSpy seem to interpret differently.

The simplest, but still annoying issue is that IlSpy doesn't use parameter names in function declarations, eg:

public static extern bool A(bool, string);

VS does nto accept this; it does require parameter names, eg public static extern bool A(bool a1, string a2); The parameter names don't care and are completely ignored, but can't be skipped (yes, you can see this as VS bug, but that's the way it is). So having dummy parameter names in the output would be nice.

Most annoying though is the heavy re-use of names in IlSpy. VS does not accept a class with the same name as one of it's method, or a method with the same name as a property/variable. So heavy refactoring is required, and often this also fails. It owuld be easiest if there's be an option in IlSpy to turn off re-use of variable names.

 

Is there any easy solution/fix for that? Or would it be better to use a different decompiler, and if so, which one?

Of course there are also other small things, like goto to wrong scopes, but these can usually be fixed manually. Above naming issue is huge and requires a lot of manual work ... :-(

Thanks in advance,

 

Andy

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles