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. Commented 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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.