WixToolset 3.11 Util:PermissionEx createfolder 错误
WixToolset 3.11 Util:PermissionEx error for createfolder
我是 Wix 安装工具包的新手,一直在尝试创建安装程序。我将它用作 VS 2017 的插件。这就是我所知道的。
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util=" http://schemas.microsoft.com/wix/UtilExtension">
<Directory Id="CommonAppDataFolder">
<Directory Id="ProgramDataVendorFolder" Name="ABC">
<!--This will create the \ProgramData\MyVendor\MyProductName\ folder. -->
<Directory Id="ProgramDataAppFolder" Name="DEF" />
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="ProgramDataAppFolder">
<Component Id="CmpCreateCommonAppDataFolderWithPermissions" Guid="*" Permanent="yes">
<CreateFolder>
<!--This will ensure that everyone gets full permissions to the folder that we create in the ProgramData folder.-->
<util:PermissionEx User="Everyone" GenericAll="yes" />
</CreateFolder>
</Component>
</DirectoryRef>
在项目中添加了对 "WixUtilExtension.dll" 的引用。
但我收到错误
Error : The CreateFolder element contains an unhandled extension
element 'util:PermissionEx'. Please ensure that the extension for
elements in the ' http://schemas.microsoft.com/wix/UtilExtension'
namespace has been provided.
另外我也试过使用http://wixtoolset.org/schemas/v4/wxs/util instead of http://schemas.microsoft.com/wix/UtilExtension
我试图注释掉上面的代码,然后得到错误
The extension
'Microsoft.Tools.WindowsInstallerXml.Extensions.UtilExtension'
contains a defintion for table 'EventManifest' that collides with a
previously loaded table definition. Please remove one of the
conflicting extensions or rename one of the tables to avoid the
collision.
有人可以帮我解决这个问题吗?
Missing Reference: You must have forgotten to add a reference to the
WixUtilExtension.dll
file in the WiX installation folder. Please follow the procedure below to add the reference.
在Visual Studio:
- 打开您的 WiX 项目。
- 在右侧窗格中右键单击
"References"
=> Add References...
- 浏览到文件,或粘贴以下内容(如果使用标准安装路径)
C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUtilExtension.dll
.
- 点击
"Add"
然后点击"OK"
.
WiX Sample Code: Some WiX sample code described here.
添加到 WiX 元素的最常见命名空间:
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" (Burn)
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" (.NET)
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension" (IIS)
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" (Util)
xmlns:wixloc="http://schemas.microsoft.com/wix/2006/localization" (Localization)
IsWiX 非常适合命名空间等(下面的屏幕截图)。这是来自 Chris Painter 的免费 WiX 工具:
您在 xmlns:util 名称space 中有前导 space。删除它,一切正常。
我是 Wix 安装工具包的新手,一直在尝试创建安装程序。我将它用作 VS 2017 的插件。这就是我所知道的。
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util=" http://schemas.microsoft.com/wix/UtilExtension">
<Directory Id="CommonAppDataFolder">
<Directory Id="ProgramDataVendorFolder" Name="ABC">
<!--This will create the \ProgramData\MyVendor\MyProductName\ folder. -->
<Directory Id="ProgramDataAppFolder" Name="DEF" />
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="ProgramDataAppFolder">
<Component Id="CmpCreateCommonAppDataFolderWithPermissions" Guid="*" Permanent="yes">
<CreateFolder>
<!--This will ensure that everyone gets full permissions to the folder that we create in the ProgramData folder.-->
<util:PermissionEx User="Everyone" GenericAll="yes" />
</CreateFolder>
</Component>
</DirectoryRef>
在项目中添加了对 "WixUtilExtension.dll" 的引用。
但我收到错误
Error : The CreateFolder element contains an unhandled extension element 'util:PermissionEx'. Please ensure that the extension for elements in the ' http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided.
另外我也试过使用http://wixtoolset.org/schemas/v4/wxs/util instead of http://schemas.microsoft.com/wix/UtilExtension
我试图注释掉上面的代码,然后得到错误
The extension 'Microsoft.Tools.WindowsInstallerXml.Extensions.UtilExtension' contains a defintion for table 'EventManifest' that collides with a previously loaded table definition. Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.
有人可以帮我解决这个问题吗?
Missing Reference: You must have forgotten to add a reference to the
WixUtilExtension.dll
file in the WiX installation folder. Please follow the procedure below to add the reference.
在Visual Studio:
- 打开您的 WiX 项目。
- 在右侧窗格中右键单击
"References"
=>Add References...
- 浏览到文件,或粘贴以下内容(如果使用标准安装路径)
C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUtilExtension.dll
. - 点击
"Add"
然后点击"OK"
.
WiX Sample Code: Some WiX sample code described here.
添加到 WiX 元素的最常见命名空间:
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" (Burn)
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" (.NET)
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension" (IIS)
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" (Util)
xmlns:wixloc="http://schemas.microsoft.com/wix/2006/localization" (Localization)
IsWiX 非常适合命名空间等(下面的屏幕截图)。这是来自 Chris Painter 的免费 WiX 工具:
您在 xmlns:util 名称space 中有前导 space。删除它,一切正常。