- Can we decompile a .exe or .dll file as 100%? Also sometimes seems some mistakes on somewhere (like mainfrm.cs) , how can we fix that?
- What is the best .NET decompiler? or What would you prefer?
I wanna get an answer for my questions. Thanks!...
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
Since the compilation output of .NET languages is MSIL, which is quite readable itself, it can be transformed back to (almost) original source code.
There are many applications which can do that.
My favourite is dnSpy since it's free, open source and has debugging functionalities. AFAIK it can even try to build a Visual Studio Solution (
.sln) file from your input which should be what you look for.
But under certain circumstances some information is lost during the compilation process.
You would have to manually fix those errors. For example anonymous functions can confuse a decompiler easily. And of course - if the developer tries to protect his application there are various techniques like obfuscation which would make your life harder.
So to answer your questions directly:
Plug and Playsolution. You will have to fix a few things yourself if you want to have a recompilable project.
best ..is very subjective here are a few suggestions (in no particular order):