I was testing a portion of new code in a loop, a lot really, as I was just creating it there were a lot of commened stuff, so when I tries to comment the new code it was being an ass, so I just cut it ready to ctrl + z back.

Alas I forgot to put it back, and saved project and closed.

Are there any backups stored in VS2010?

Edited 3 Years Ago by Suzie999

As far as i know there isnt a backup of the file. You might be able to get away with restoring the file windows if you have Shadow copy turned on? What OS are you using?

Yes, you're probably screwed. Consider using source code version control in the future. As a last ditch effort, you can check your autorecovery backup files for the project. It depends on your OS, but the folder is under your documents. For example, on my Windows 7 machine it's:

C:\Users\jdaughtry\Documents\Visual Studio 2010\Backup Files

I wouldn't get your hopes up if I were you though.

Edited 3 Years Ago by deceptikon

Suzie if you have windows 7 go into the folder that holds the files for your project. Right click on a blank space and go to properties. in the properties page go to the previous version tab. It should have a list of different versions if you have volume shadow copy turned on.

I think you've just learnt an important lesson. Always remember to paste what you want to save from the paste buffer, especially if it's a large amount of program code.
I find that opening a simple text editor and pasting text temporarily to it can be useful.
I must admit I had difficulty in following your question in the forum. Is English your first language?

Thank you all for your attention, I appreciate it.
I never had volume shadow copy, and I don't know how to, or even what is version control.

I did, like mentioned, though, learn a lesson that I already knew again :(.

Ah well the practice of trying to write the same code twice is very good in my opinion, and as a matter of fact, it was better the second time around, and actually worked.

I will have a search, but if anyone knows of a good, plainly written, guide on how to use version control, I'd appreciate the link.

Thanks once again.

This question has already been answered. Start a new discussion instead.