What is the easiest way to make a backup in visual studio 2013?

删除回忆录丶 提交于 2019-12-05 04:04:01

问题


I want to make a backup from the whole project. I also need to rename every backup. I'dont like the way to copy the project folder and rename the folder and the project file. I've already tried to make it like that: http://jasonfaulkner.com/VisualStudioExpressProjectBuildBackups.aspx

But it doesn't work, I am always getting the error "Invalid parameters"

Does anyone already tried this?

Thanks


回答1:


The DPack extension for Visual Studio includes the Solution Backup tool that creates a zip archive of the solution and auto names it.




回答2:


Just use source control.

Once you have that you can arrange backing up source control server in case hard disk or other hardware/software/service failure.

There are plenty to choose from: subversion, TFS, git, google code, bitbucket (these are just the most popular, but there are tens if not hundreds of others).




回答3:


Manually edit .sln file

This method is entirely aimed at renaming the directory for the project, as viewed in Windows Explorer.

This method does not suffer from the problems in the Remove/add project file method below (references disappearing), but it can result in problems if your project is under source control (see notes below). This is why step 2 (backup) is so important.

1- Close Visual Studio.

2- Create a backup of your .sln file (you can always roll back).

3- Imagine you want to rename directory "Project1" to "Project2".

If not using source control, rename the folder from "Project1" to "Project2" using Windows Explorer.

4- If using source control, rename the folder from "Project1" to "Project2" using the functions supplied by source control. This preserves the history of the file. For example, with TortoiseSVN, right click on the file, select TortoiseSVN .. Rename.

5- In the .sln file, edit all instances of "Project1" to be "Project2", using a text editor like NotePad.
6- Restart Visual Studio, and everything will work as before, but with the project in a different directory.

Alse would recommend TFS, a powerfull tool to do what you pretend. You will be able even to recover previous versions of specific files,if you have any error and you have troubles find it you can see what changes you did since last "check in " etc. There are many options



来源:https://stackoverflow.com/questions/30477493/what-is-the-easiest-way-to-make-a-backup-in-visual-studio-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!