Monday, 12 December 2011

MSBuild and XmlTransform

Using .NET 4.0 you can use the Config Transformation features by which we can maintain multiple configuration files for different environments. To have one of these files built as part of your continuous integration you can use the MSBuild task TransformXml:

An example of the code usage is below:

<UsingTask TaskName="TransformXml" 

<Target Name="GenerateConfigs">
  <TransformXml Source="Source\Web.config"

No comments: