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?

4

1 回答 1

8

一种选择是使用 MSBuild 任务来执行配置转换。从Transforming a web.config file for deploy您可以调用 MSBuild 通过调用 TransformWebConfig 目标进行转换:

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

在 BuildMaster 中,您可以使用“Build .NET MSBuild Project”Action 而不是“Build .NET Application”Action,然后传入这些参数。

于 2013-07-24T16:56:20.440 回答