MSBuild과 MSBuild Community Tasks (XMLUpdate 및 XMLMassUpdate 사용)을 사용하여 Web.config의 여러 섹션을 업데이트했습니다. 내가있는 경우 :MSBuild 스크립트에서 XML 속성을 어떻게 업데이트합니까?
<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>
와 내가 뭔가를 업데이트 할 수 아무것도 찾을 수없는 것으로보고하는 target
<XmlUpdate XmlFileName="$(BuildDir)\Builds\%(Configuration.Identity)\_PublishedWebsites\Presentation\Web.config"
XPath="//configuration/nlog/targets/target[@fileName]"
Value="${logDirectory}\SomeLog_%(Configuration.Identity).log" />
의 fileName
를 교체하려고, 그래서 제 질문은 내가 파일 이름 속성을 얻을 수있는 방법이다 업데이트?
편집 : NLog 섹션은 자신의 네임 스페이스를 정의로이 네임 스페이스 충돌의 경우가 될 수 있을까?
UPDATE : 작동하지 않습니다 이름 공간을 선언 게시 된 대답.
이것은 매력처럼 작동했다 .... 매우 감사드립니다! – Dean