使用msbuild xmlupdate设置customErrors模式

时间:2012-09-24 16:30:02

标签: msbuild custom-errors xmlupdate

我们使用xmlupdate在我们的测试环境中更改web.config。当我们刚刚更新节点的值时,这可以成功运行。我们想要在我们的测试环境中关闭customErrors,并且不确定如何使用xmlupdate执行此操作,因为它不仅仅是节点中的值;它在关键标签内。

<customErrors mode="RemoteOnly" redirectMode="ResponseRewrite">

需要成为

<customErrors mode="Off" redirectMode="ResponseRewrite">

-----------------这是我们成功使用的一个例子。

<XmlUpdate
   XmlFileName="%(Codebase.Path)\imod.net_fw2\Web.config"
   Xpath="//configuration/appSettings/add[@key='TrackingConnString']/@value"
   Value="$(TrackingConnStr)"
   Condition ="'%(Codebase.Path)'!=''"
   />   

谢谢!

0 个答案:

没有答案