Decompile C# Exe with partial source code available
I maintain a C# program at work and due to a hard disk crash i lost a big chunk of code for an already deployed version (which is my own fault for not pushing the git repository often enough) and now i have to make some changes to the program. I have the source code of an older version of the program and i want to decompile the exe and merge it with the older source to restore the code i lost.
I know i can decompile with tools like the reflector, but i don't want to merge it with the old code by hand, as i then could just code the changes again (about 1-2 days of work). Is that possible or do i have to go through the开发者_StackOverflow中文版 code dump manually?
I suggest you recompile the old code, and decompile that with reflector.
Then decompile the current executable with reflector, and diff those two. That way you'll only see the changes you made and you can apply those to your old source code, rather than just taking a diff between decompiled code and the original source - which will obviously throw up huge amounts of uninteresting differences (comments, for one thing!).
I can't see how it would get better than that, to be honest. It will be a manual process of course, but it should still save you some time.
I had to do this once, I recommend Dis#.
Edit:
Now, ILSpy is much better
精彩评论