I have to deploy my solutions in many environnement (dev,staging,..)
2 Options: replace the whole file of just sections. Solution on either of them would be appreciated
I made 4 differents files: appSettings.Staging.config, appSettings.Dev.config, connectStrings.Dev.config, connectStrings.Staging.config.
I want to replace those section in the web.config during deployment.
My msBuild Section looks like this
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\Travail\erp.visual.webapp.erpportal</workingDirectory>
<projectFile>erp.visual.webapp.erpportal.sln</projectFile>
<buildArgs>/p:ProjectFile=$SolutionFile$ /t:TransformWebConfig /p:Configuration=Staging</buildArgs>
<targets>Build</targets>
<timeout>900</timeout>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
How can i retrieve the "/p:Configuration=Staging" argument ? i try the folowing
<ItemGroup Condition=" '$(Configuration)' == 'Staging' ">
<WebConfigReplacementFiles Include="appSettings.Staging.config">
<Section>appSettings</Section>
</WebConfigReplacementFiles>
<WebConfigReplacementFiles Include="connectionStrings.Staging.config">
<Section>connectionStrings</Section>
</WebConfigReplacementFiles>
</ItemGroup>
But where do I place this section into the ccnet.config ?