You want to use a version control system such as Team Foundation Server (TFS), Git, Mercurial, Subversion, etc. I personally recommend Git. Many of them have integration tools with Visual Studio 2012 (for example, see How to connect Visual Studio 2012 using git (github)? ). Version control software supports features such as tracking file changes, creating code branches, combining code from different commits / users together, etc.
Here's what a simple workflow might look like with version control (see https://guides.github.com/introduction/flow/ for an example GitHub thread):
- You are ready to add a new function / launch a new version. For simplicity, suppose you are working on a single branch (for example, git "master").
- As you program, you make incremental changes to the source code and regularly correct these changes. Each commit gives you a snapshot of your work, and you can return to any commit at any time and compare the changes between the commits. The selected VCS will affect the synchronization of these changes with the central / remote repository. You can even check the history of changes and look at previous versions of certain files, and your code is usually backed up on another server for you without additional work.
- When you are ready to release, you can mark a specific revision (or combine the branch functions in master, or ... etc.). In any case, you can track all the cumulative changes that you made for each version, and be able to return to anywhere.
There are several other steps you can consider for versions, such as updating build information. The AssemblyInfo.cs file has assembly metadata indicating the assembly version, file version (or the information version that I prefer). See What is AssemblyInfo.cs for? . You can configure Visual Studio to automatically increase version numbers.
Team Foundation Server should be available by default with VS 2012, although I am not clear about the details of setting up a TFS server to host your repositories. Visual Studio added direct support for git (open source, very popular) starting in VS 2013, however there is an extension available in 2012 ( https://visualstudiogallery.msdn.microsoft.com/abafc7d6-dcaa-40f4- 8a5e-d6724bdb980c ). The extension allows you to perform some of the most commonly used git functions, such as commit, fork, and click.
Here are some links to get you started:
Why should I use version control?
Using git with Visual Studio
https://git-scm.com/download/win
https://tortoisegit.org/
https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx
Jacob source share