Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top