-1

I made today few changes by ctrl+h to all the solution. When I understood my mistakes I tried to undo it with ctrl-Z but the results were awful.

The question is : How can I reload the last compiled project before I had done this stupid move. Lets say I want the solution as it was at yesterday.

Thanks for your help, Eliran.

Sam Axe
  • 33,313
  • 9
  • 55
  • 89
  • In the old times, we used backups. Nowadays we use version control systems such as git or mercurial. If you did not implement one, I really do not know how to reverse the situation. I really advise to use Git. – mcy May 25 '14 at 08:58
  • Not a solution but maybe you should use [Version control](http://en.m.wikipedia.org/wiki/Version_control) – Silvermind May 25 '14 at 08:58
  • Have you tried using `Control+H` to reverse your problem? – Silvermind May 25 '14 at 09:02
  • It's harsh lesson this one, now you are going to become as fervent about source control and backups as the rest of us aren't you. – Tony Hopkinson May 25 '14 at 09:15
  • If you're lucky and have [File History/Shadow Copies](http://en.wikipedia.org/wiki/Shadow_Copy) turned on, you can restore the previous snapshot of your file(s). – Simon MᶜKenzie May 25 '14 at 10:50

2 Answers2

0

You cannot. Once saved, the changes are irreversible. That's the point of backups. There are tools to decompile your .NET executable, but as not all sourcecode is actually compiled into the executable (for example formatting and comments are not), you will never get your original code back.

You may want to look into source control software like Git, Subversion or Team Foundation Server to handle this problem properly next time.

nvoigt
  • 75,013
  • 26
  • 93
  • 142
0

you can try decompiling the old binary with tools like dotPeek. But in general that is the reason why you use a source control system.

Dirk Trilsbeek
  • 5,873
  • 2
  • 25
  • 23