How can I manage versions of my projects using Visual Studio 2012 Professional

I am working on creating an asp.net mvc web application using visual studio 2012 professional. Now that I want to update my project, for example, adding new features, follow these steps: -

  • I copy the project folder.
  • skip it in the version folder.
  • work on the original project, whether I added new features and code.
  • Now, if I want to return the project back to the new features, I can open the folder inside the Versions folder. and so on...

now my current approach is how sufficient it is .. but I'm trying to find a more automatic approach where I can, for example, undo a specific file, say, some kind of .cs file in its previous version or return my whole project to a specific point .

can anyone advise how Visual Studio 2012 can help me with version control? Thanks in advance for any help.

Hello

+5
source share
4 answers

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

+7
source

I use VSTS and itโ€™s fantastic. You can use GIT or TFS version control. Both are hosted by Microsoft. I prefer Microsoft because of the idea of โ€‹โ€‹long-term support and reliability. You can see that they support VS 2008 up to the current one.

https://www.visualstudio.com/team-services/pricing/

It is also free for 5 users.

From the link below. It has full support for many versions of Visual Studio.

Q: What versions of Visual Studio can I use with Visual Studio Team Services?

A: You can use:

  • Visual Studio "15"
  • Visual studio 2015
  • Visual studio 2013
  • Visual studio 2012
  • Visual Studio 2010 requires Service Pack 1 (SP1) and KB2662296
  • Visual Studio 2008 SP1 requires a GDR update. To connect to the Services team with
  • Visual Studio 2008 through 2012.

Launch Visual Studio. In the "Team" or "Team Browser" menu, go to the "Connect to Team Foundation Server"> "Select Group Projects"> "Servers" section. Add your Team Services account ({youraccount} .visualstudio.com). Select your team project and complete the connection. If you get connection errors, try choosing HTTPS as the protocol.

https://www.visualstudio.com/en-us/docs/setup-admin/team-services/connect-to-visual-studio-team-services

GIT Vs TFS Version Control - https://www.visualstudio.com/en-us/docs/tfvc/comparison-git-tfvc

One thing to watch as you visualize code editing and verification. I personally believe that TFS version control follows a very simple and linear model. I prefer it to git. But its really Apples versus Oranges, and usually people love what they are used to. I will say that GIT is currently under active development and not as rich as TFS-VC. Not to mention the fact that VSTS connects to the entire ecosystem of plugins, build systems, test infrastructure, and their entire Azure cloud platform.

0
source

If you do not need to share files with a controlled version, I like TurtleSVN. Its simple and I like the UI that it has for displaying modifications between versions. It adds a right-click selection to any file or folder in Windows Explorer for "TurtleSVN", and then all operations can be processed from there.

0
source

My Suggestion still uses TFS - my project, which is a product (ASP.MVC application) - we use the following structure in TFS ..

we have the main branch - the DEV branch - the QA branch and the SP branch. See attached screenshot) enter image description here The main section . Where all the code is combined using scripts - before we start with a new development version, and then a new DEV branch with a version will be created from this main branch. - therefore, we keep track of each version and new features added to each version ... and for the new client - the code from the main branch.

Dev . Based on the added functions, we create a different folder for each new set of functions / improvements and install this version.

SP . Upon completion of development, the DEV branch freezes, and we create a new branch identifier and deploy the code for the QA team - any defective objects are committed to the SP and deployed to QA - as soon as testing is complete, the SP code will be frozen with the approved QA and deployed to the main and provided To customers.

Finally, using a script - every thing from SP is merged into Main .. and for new development - a new branch in DEV is created from Main .. Thus, we track improvements / functions for each phase of DEV and the corresponding SP, and our product develops in Main .

Hope this helps ...

0
source

All Articles