在WiX中删除XML元素

在WiX中删除XML元素,xml,wix,wix3,Xml,Wix,Wix3,如何在WiX中从XML文件中删除/删除元素?给定一个包含以下内容的.config文件: <configuration> <thingy> <stuff> <item type='value' /> <item type='value2' /> </stuff> </thingy> </configuration> 您还必须将-ext wixutileextension添加到l

如何在WiX中从XML文件中删除/删除元素?

给定一个包含以下内容的.config文件:

<configuration>
 <thingy>
  <stuff>
   <item type='value' />
   <item type='value2' />
  </stuff>
 </thingy>
</configuration>

您还必须将
-ext wixutileextension
添加到
light.exe
命令选项中,或者添加对“WixUtilExtension.dll”的引用,如果您正在visual studio中使用Voctive编写wix项目。

我知道这是一个古老的问题,但我到处都在搜索我的问题,直到最终找到答案,才找到它。因此,也许通过在这里发布,有人会发现它很有用

除上述答案外,如果使用V4.0,xmlns:util链接应如下所示:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
   xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" 
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" >

否则,将出现以下错误:


Component元素包含未处理的扩展元素“util:Blah”。请确保已提供“http:⁄schemas.microsoft.com⁄wix⁄UtilExtension”命名空间中元素的扩展。

ElementPath指向VerifyPath的父级。非常有帮助,谢谢!使用WIX3.6,我还必须向candle添加
-extwixutileExtension
。感谢您添加v4的信息
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" 
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" >