I wrote a C# application for a client a couple of years ago, but I no longer have the source code. All I have is the EXE that I deployed on the client's PC. Is there a way I can generate C# source code from the EXE?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Telerik JustDecompile is free and has a feature to create projects from .NET assemblies.
Reflector and the File Disassembler add-in from Denis Bauer. It actually produces source projects from assemblies, where Reflector on its own only displays the disassembled source.
ADDED: My latest favourite is JetBrains' dotPeek.
You want reflector.
I'm surprised no one has mentioned Microsoft's ildasm. It may not be as pretty as ILSpy or Reflector, but it comes with Visual Studio so many developers already have it.
To run it (assuming VS 2013, should be similar for other versions):
Now you can navigate the DLL structure. Double-click on class members to see the IL. Use File > Dump to export IL to a file.
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.
Reflector is no longer free in general, but they do offer it for free to open source developers: http://reflectorblog.red-gate.com/2013/07/open-source/
But a few companies like DevExtras and JetBrains have created free alternatives:
DevExtras CodeReflect
JetBrains DotPeek