TheEdge
TheEdge

Reputation: 9851

Backing up source code for a C# solution

I would like to make a backup copy of my Visual Studio 2013 MVC application which is only the source code. Such that I could open the solution on a new machine and have it compile after NuGet has downloaded the necessary packages and so on.

I realise that if the project was in TFS or similair I could go to the new machine and download it like that, however I am looking for a file copy solution.

Now while I could ZIP up the entire folder including binaries that seems like a sledge hammer approach. Having looked around there does not appear to be an easy way to do this. Has anyone got a solution or a utility I may have missed?

Upvotes: 0

Views: 296

Answers (2)

Ondrej Tucny
Ondrej Tucny

Reputation: 27962

Use a version control system such as TFS, Subversion, PlasticSCM, git whatever. Seriously. Distributed VCSs like git or Mercurial will let you transport the whole repository easily.

If you insist on a pack&go approach, the ZIP tool of your choice will, most likely, support include / exclude rules based on file name patterns. For example, in Total Commander it's easy to exclude bin and obj folders.

Upvotes: 1

Georg
Georg

Reputation: 5781

I am not sure how this feature is called in English but there is something like Clean solution in Visual Studio. This will delete all the binaries and stuff that can be generated. I am not sure it will also delete NuGet downloads but you may give it a try. Afterwards, you can simply copy the project or solution folder.

Upvotes: 0

Related Questions