【发布时间】:2010-03-03 15:44:35
【问题描述】:
我们的 Team Foundation Server 必须构建同一解决方案的三个不同版本。它们之间的唯一区别是app.config 文件,每个构建都应该更改它。在构建过程中如何选择正确的文件?
我想要做的是切换 app.config 文件,然后构建,对每个文件重复。即:
<Replace file="app.config" with="app.config.one"> <!-- and then -->
<SolutionToBuild Include="project.sln"/>
<Replace file="app.config" with="app.config.two"> <!-- and then -->
<SolutionToBuild Include="project.sln"/>
<Replace file="app.config" with="app.config.three"> <!-- and then -->
<SolutionToBuild Include="project.sln"/>
(我意识到上述内容很幼稚,但它表明了我想要做的事情)。
我尝试过使用BeforeCompileSolution 等来回设置属性,但没有。
顺便说一句,这是一个 ClickOnce 项目(使用 Publish 目标),因此由于文件完整性检查,我必须在编译步骤之前选择正确的 app.config 文件,如this 问题中所述。
【问题讨论】:
标签: visual-studio tfs msbuild continuous-integration