Reflector and its add-in FileDisassembler.
Reflector will allow to see the source code. FileDisassembler will allow you to convert it into a VS solution.
Answer from GEOCHET on Stack OverflowReflector and its add-in FileDisassembler.
Reflector will allow to see the source code. FileDisassembler will allow you to convert it into a VS solution.
When Red Gate said there would no longer be a free version of .Net Reflector, I started using ILSpy and Telerik's JustDecompile. I have found ILSpy to decompile more accurately than JustDecompile (which is still in Beta). Red Gate has changed their decision and still have a free version of .Net Reflector, but now I like ILSpy.
From the ILSpy website (https://github.com/icsharpcode/ILSpy/):
ILSpy is the open-source .NET assembly browser and decompiler.
ILSpy Features
- Assembly browsing
- IL Disassembly
- Decompilation to C#
- Supports lambdas and 'yield return'
- Shows XML documentation
- Saving of resources
- Search for types/methods/properties (substring)
- Hyperlink-based type/method/property navigation
- Base/Derived types navigation
- Navigation history
- BAML to XAML decompiler
- Save Assembly as C# Project
- Find usage of field/method
- Extensible via plugins (MEF)
Update:
April 15, 2012, ILSpy 2.0 was released. New features compared with version 1.0:
- Assembly Lists
- Support for decompiling Expression trees
- Support for lifted operatores on nullables
- Decompile to Visual Basic
- Search for multiple strings separated by space (searching for "Assembly manager" in ILSpy.exe would find AssemblyListManager)
- Clicking on a local variable will highlight all other occurrences of that variable
- Ctrl+F can be used to search within the decompiled code view
Update:
- ILSpy 2.1 supports async/await decompilation
Videos
Decompiling is generally done for research / security purposes, or reverse engineering. Normally wouldn’t be decompiling so that you could then recompile for production use.
With that said, this is a tough spot. It’s also very jacked that they didn’t provide source code before closing doors. Let it be a good lesson and make sure future contracts avoid this problem.
You will need a decompiling tool. For C#, dotPeek looks promising. dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains
We have a program written by a vendor that is no longer in business. It was written in C#. We have the source code but not from the last time it was updated and compiled. We could use that but there was a signficant amount of updates in the last EXE.
I looked for a way inside of Visual Studio 2022 to decompile the exe but I can’t find an option.
What else can I do to decompile this back as a solution, edit, and then recompile?
Thanks!
Brian
Hi there,
I've been trying to edit an .exe file.
However I used DotPeek to decompile it, found the part of the code that needed to be edited (in C# btw).
And now ive edited the code via notepad++ and I want to compile it again.
Here's where the fun began, Visual Studio gives me more than 150 errors when trying to build/rebuild and if I try DNspy it also gives me the same errors.So I thought maybe it is the way I edited the code, after decomping and then instantly recomping still the same issues occoured.
I would love some help and or suggestions about maybe different tactics or software
Thanks in Advance!
Edit:
https://paste.pics/8GB4I The lines 208-230 need to be edited for me
Hi All,
I have an very small application that installs .Net Framework and sets an interactive logon message for our non domain PC’s, this was built in house by a previous software developer, I’m wanting to decompile the executable to modify the interactive logon message after a change in our department structure and then recompile it, can anyone advise?
I have no idea where to start, I’m more hardware / network based than software development! I believe it was created with Visual Studio, but the developer didn’t leave any documentation for the application, what its coded in, how it works etc…
Thanks
dotPeek is my go to for this kind of task. The simpler the executable, the easier it’ll hopefully be for you to figure out. Even more so if it’s not Forms/WPF based.
As far as free and open source tools go, I'd recommend dnSpy. It is the best tool I've used for .NET reverse engineering.
You might also want to try out ILSpy, which is free and open source as well.
Consider also JetBrains dotPeek that is free, decompiles .NET 1.0-4.5 assemblies to C#.
Has support for .dll, .exe, .zip, .vsix, .nupkg, and .winmd files.