In this example a confige file is written.
<target name="Private.Coverage.WriteConfiguration"> <call target="Private.Coverage.GetConfigFile"/> <write file="${Private.Coverage.ConfigFile}" append="false"> <text><![CDATA[<?xml version="1.0"?> <CoverageConfiguration targetNamespace="urn:CoverageConfiguration">]]> </text> </write> <foreach item="File" property="Private.Coverage.PrepareFor.AssemblyPath" > <in> <items refid="Coverage.Targets" /> </in> <do> <write file="${Private.Coverage.ConfigFile}" append="true"> <text> <![CDATA[<Assembly Owner="bogas@nowhere.com" Description="%Description%" AssemblyName="%AssemblyName%" ReportDirectory="%ReportDirectory%"/>]]> </text> <filterchain> <replacestring from="%Description%" to="${path::get-file-name-without-extension(Private.Coverage.PrepareFor.AssemblyPath)}" /> <replacestring from="%AssemblyName%" to="${string::to-lower(path::get-file-name(Private.Coverage.PrepareFor.AssemblyPath))}" /> <replacestring from="%ReportDirectory%" to="${Coverage.ReportFolder}" /> </filterchain> </write> </do> </foreach> <write file="${Private.Coverage.ConfigFile}" append="true"> <text><![CDATA[ <Asp Selected="false"/> <Services> </Services> </CoverageConfiguration>]]> </text> </write> </target>