Solved

TFS 2012: How to flag different build environments?

Posted on 2013-01-03
3
831 Views
Last Modified: 2013-01-04
Subject:
TFS 2012 version control question

Question:
I am new to Team Foundation Server and would like some assistance in accommodating several build environments such as Development and Production.

I am using TFS 2012 and our developers would like to flag their source code as “dev” to show that the code is currently in the development environment.

When the code is ready for production, they would like to flag it as “prod” so that another team can begin moving the code to the production environment.

Does TFS 2012 natively offer the ability to specify flags that represent different build environments?  If not, how are others accomplishing this task?
0
Comment
Question by:waltforbes
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
Comment Utility
We use branches at our ourganization. For example, we have a DEV, UAT, and PROD branch for each of our projects. We do all of your development in the DEV branch (obviously), and when the code is ready for testing, we merge the code into the UAT branch. Then we check out that branch of code and deploy from it. This allows developers to continue developing against the DEV branch while the UAT branch is being tested. Once UAT is complete, we merge the UAT branch up to the PROD branch for similar reasons.

I learned what I know about branching and merging at my current job, so the following is information I haven't really reviewed myself, but I think it will be helpful for you:

http://vsarbranchingguide.codeplex.com/
http://msdn.microsoft.com/en-us/magazine/gg598921.aspx
http://blogs.msdn.com/b/lukad/archive/2010/01/18/visual-studio-tfs-branching-guide-2010.aspx
0
 
LVL 74

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 500 total points
Comment Utility
P.S.

We also create different Solution Configurations for each of our deployments. This allows us to quickly switch between solution/project settings when moving between environments. You can find information about this here:

http://msdn.microsoft.com/en-us/library/bb166577.aspx

The screenshots appear a bit dated, but the info is still relevant.

Also, if you are doing ASP.NET work, then built in to Visual Studio are XML Transformations. These allow you to specify XSLT transformations against your web.config files. You can use these transformations to have the settings within your web.config that can change from environment to environment be dynamically written during a build. You get one transform per solution configuration that you set up. Here's an example of what that looks like:

Screenshot
Each of those entries underneath the top-level web.config correspond to a solution configuration. Within each of those files, you can specify what needs to be changed. For more information on XML Transforms, you can review:

http://msdn.microsoft.com/en-us/library/dd465326.aspx

Also, if you are doing non-ASP.NET work (e.g. Windows Forms, Console applications, etc.), then Scott Hanselman's team created an extension to Visual Studio to permit the same behavior I described above within non-ASP.NET applications. This extensions is called SlowCheetah, and you can find it within the NuGet package manager. It behaves the same way as the ASP.NET utility does, except that it modifies the end-config files upon a build, whereas the ASP.NET utility only modifies config files during deployment, not build.
0
 

Author Comment

by:waltforbes
Comment Utility
To Kaufmed: your answers are awesome and have great links! I am so grateful for your expert help. I will now award the full points, closing the case.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Introduction: Sometimes when I receive a call from my users to solve their problems it is very difficult for me to found their computer IP address. Even finding their computer Host to provide remote support can be a problem.  So I resorted to Goo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now