Visual Studio Project restore old version

2019-07-23 14:02发布

I am working on an ASP.NET web project in Visual Studio 2013 and it worked couple of hours before. But an hour ago I was tweaking something in the project and messed up the entire project. Is there anyway to restore to the version I had yesterday?

3条回答
Animai°情兽
2楼-- · 2019-07-23 14:18

If you are using Version control, such as Mercurial, GIT, Subversion, TFS -- and you remembered to commit your work then YES, definitely.

If you're not using Version Control then you need to ask yourself why not? And don't turn off the computer today until you've corrected that oversight.

Also, you may have previous versions/restore points saved for you in Windows. In windows explorer, right click on the folder where your work is being saved and select properties. They may be a 'previous versions' tab, and inside there you may be able to revert to an earlier version. If so: lucky lucky you.

Also, if your work is being shared using a service like DropBox, you will be able to find earlier versions of your solution or project files.

There is one other technique, and I... I hesitate to mention this. What you need is a DeLorean car from the eighties, and enough plutonium to generate 1 point 21 GigaWatts. You also need.... forget it, no, Version Control is your best bet. Or Ctrl+Z.

查看更多
We Are One
3楼-- · 2019-07-23 14:20

Holding ctrl+z for a few minutes, and using version control are the only two ways I am aware of doing that..

查看更多
叼着烟拽天下
4楼-- · 2019-07-23 14:36

In case you're like me and trying to recover from what you just did, if you saved your work to OneDrive, you can find the previous version of your work by logging into OneDrive through a web browser.

查看更多
登录 后发表回答