3

In our projects we have multiple config files for each environment using the techniques prescribed by Microsoft as outlined here: http://msdn.microsoft.com/en-us/library/dd465326.aspx

So we have the following files: web.config web.Deploy.config web.Release.config

As we are a small development team this makes life very simple as we do not need to leave Visual Studio to make changes to these files. Added to that they are version controlled in case we ever need to roll back.

We would like to continue using this method and we are not interested in moving these different files into BuildMaster's configuration management system.

How can we get BuildMaster to work with these files or use MSDeploy to create our deployment artifacts?

1
  • There's a better answer than your own; please change the accepted answer. Jul 26, 2013 at 13:38

1 Answer 1

8

One option is to use the MSBuild task to perform the configuration transformation. From Transforming a web.config file for deployment you can call MSBuild to do the transformation by invoking the TransformWebConfig target:

MSBuild Project.csproj /t:TransformWebConfig /p:Configuration=Staging

In BuildMaster, you can use the "Build .NET MSBuild Project" Action instead of the "Build .NET Application" action, and then pass in these parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.