I am new to Wix installation toolkit and have been trying to create an installer. I am using it as a plugin to VS 2017. This is so far as I have got.
<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>
Added a reference to "WixUtilExtension.dll" in the project.
But I get the error
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.
In addition I have also tried using the http://wixtoolset.org/schemas/v4/wxs/util instead of http://schemas.microsoft.com/wix/UtilExtension
I tried to comment out the code above and then get the error
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.
Could someone please help me out here.
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.
In Visual Studio:
"References"
in the right pane => Add References...
C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUtilExtension.dll
."Add"
and then "OK"
.WiX Sample Code: Some WiX sample code described here.
The most common namespaces to add to the WiX element:
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 is nice for namespaces and more (screenshot below). It is a free WiX tool from Chris Painter: