Reputation: 225
I have one code base but multiple clients. Is there a way that I can use a build definition to build out to separate IIS folders and also change the config for each client as well rather than changing it in source and build them one by one.
I'd even be happy enough with having one build defination for each client that changes only what it needs to from the code in TFS.
Thanks!
Upvotes: 0
Views: 1763
Reputation: 23434
You can create a Configuration like the current "Debug" configuration in Visual Studio which will be associated with your solution. You can then have any web applications create a Web.Config transformation for each of those configurations:
Web.Config
--Debug.Web.Config
--Customer1.Web.Config
--Customer2.Web.Config
--Customer3.Web.Config
--Customer4.Web.Config
You can then edit the Build Definition and instead of just building the default configuration for the solution during the build you can tell it to build all 5 configurations.
Figure: Add multiple configurations to your TF Build Definition
It does not matter if the item (i.e. "Customer1") is not in the drop down, as long as it matches Visual Studio it will work.
This will result in:
\\DropFolder\[BuildDefenition]\[BuildDefenition]_[BuildNumber]\[configuration]\*
So if you want to get Customer 1's instance you pull from:
...[BuildDefenition]_[BuildNumber]\Customer1\_PublishSites\*
You can find how to create configurations on MSDN: http://msdn.microsoft.com/en-us/library/kwybya3w.aspx
Upvotes: 3