How to choose the correct app.config file during build in TFS?

Our Team Foundation Server must create three different versions of the same solution. The only difference between the two is the file app.configthat should be changed for each assembly. How to choose the right file during build?

What I want to do is switch the app.config file and then build, repeat for each file. I.e:

<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"/>

(I understand that this is higher, but it shows what I want to do).

I tried setting the properties back and forth using BeforeCompileSolutionetc, but not like that.

Btw, this is a ClickOnce project (using the publishing goal), so I have to choose the right file app.configbefore the compilation stage due to checking the integrity of the file as described in this question.

+3
1

, . . tfsbuild.proj, , . , .

0

Source: https://habr.com/ru/post/1735267/


All Articles