I am currently using Msbuild and Msbuild.community.tasks using XMLUpdate and XMLMassUpdate to update various sections of my Web.Config one thing has me stumped though.
If I have:
<configuration>
<nlog throwExceptions="true" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="file" xsi:type="File" fileName="${logDirectory}\SomeLog.log" layout="${message}"/>
</targets>
</nlog>
</configuration>
and I try
<XmlUpdate
XmlFileName="$(BuildDir)\Builds\%(Configuration.Identity)\_PublishedWebsites\Presentation\Web.config"
XPath="//configuration/nlog/targets/target[@fileName]"
Value="${logDirectory}\SomeLog_%(Configuration.Identity).log" />
It reports as being unable to find anything to update, so my question is how can I get the filename attribute to updated?
EDIT: Could this be a case of namespace clashes as the Nlog section defines its own namespace??
UPDATE: The posted answer declaring the name space does not work.