1
我有一个mvc3应用程序与几个配置(调试,ci,qa,客户端开发,客户端qa,发布)。我已经将web.configs很好地合并到了Visual Studio中,以便在ide中当前选择的任何配置。如何一次为mvc3应用程序合并所有web.configs
所以我在我的项目中有这个。
web.config
-web.ci.config
-web.qa.config
- etc..
我也得到了配置在巡航控制中正确合并。不幸的是,我必须构建整个产品才能获得每个配置。
这是我的巡航控制配置在单个环境中的样子。
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Projects\Source\foo.SwsFall2011</workingDirectory>
<projectFile>msbuild.xml</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Dev;DeployOnBuild=true;DeployTarget=Package;PackageAsSingleFile=false /v:d "/l:ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll;C:\Projects\Artifacts\foo.SwsFall2011\msbuild-results.xml" </buildArgs>
<targets>BuildCI;ConfigMerge</targets>
<timeout>600</timeout>
</msbuild>
有没有办法只用一个单一的任务没有做整个构建合并web.configs成一组配置目录的?例如:
configs
\dev\web.config
\qa\web.config
\client-dev\web.config