0

I have two development environments, one for production and one for development. In TFS is there a way I can keep different versions of a file for each environment?

I would like to do this on my Web.config file where I keep different connection string for each environment. Right now I either have to keep that file checked out in both environments with there respective variables or update it every time I change environments.

drobison
  • 858
  • 1
  • 14
  • 23
  • 1
    If it is only for the web.config file see [This Question](http://stackoverflow.com/questions/305447/using-different-web-config-in-development-and-production-environment) – Dan Drews Apr 29 '13 at 17:41
  • Thank you for the link, I did not know that. The issue may also come up in other files. – drobison Apr 29 '13 at 17:48
  • 1
    You can use the same transforms in other XML files by using [SlowCheetah](http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5) – John Saunders Apr 29 '13 at 18:02

1 Answers1

1

In TFS you can do that using branching and merging... create one branch for production and one for deployment

Branching is a feature that allows a collection of files to evolve in two or more divergent paths. Branching is frequently used when teams have to maintain two or more similar code bases

Merging is the process of combining the changes in two distinct branches. A merge operation takes changes that have occurred in the source branch and integrates them into the target branch. Merging integrates all types of changes in the source branch including name changes, file edits, file additions, and file delete and undelete changes. If items have been modified in both the source and target branches, you will be prompted to resolve conflicts.

you can find more on branching and merging here

Shafqat Masood
  • 2,532
  • 1
  • 17
  • 23