WiX: Error RegistryKey element contains an unexpected attribute 'ForceDeleteOnUninstall'

StackOverflow https://stackoverflow.com/questions/15393290

  •  23-03-2022
  •  | 
  •  

Question

I'm new to WiX. I just installed WixW 3.7 in order to build an open source JiraSVN plugin. But the build breaks in Visual Studio with the following errors:

The RegistryKey element contains an unexpected attribute 'ForceDeleteOnUninstall'.
The RegistryKey element contains an unexpected attribute 'ForceCreateOnInstall'.

These errors reference the product.wxs file, which contains the following elements:

<Component Id="C__Registry" Guid="{40D60013-...D30D5}" Win64="yes">
<RegistryKey Root="HKCR" Key="CLSID\{CF732FD7-...1A7E9D}" ForceDeleteOnUninstall="yes">
    <RegistryValue Value="TortoiseSVN Jira Plugin" Type="string" Action="write" />
    <RegistryKey Key="Implemented Categories">
        <RegistryKey Key="{3494FA92-...5E7831}" ForceCreateOnInstall="yes" />           </RegistryKey>
</RegistryKey>
</Component>

I am also getting warnings such as:

The 'ForceDeleteOnUninstall' attribute is not declared. 
The 'ForceCreateOnInstall' attribute is not declared.   

From what I can find in the WiX documentation, these are standard attributes in the WiX framework. So what could be causing them to be unrecognized? Where should they be declared?

Was it helpful?

Solution

First, why are you adding those attributes? From the snippet you sent they are unnecessary and just going to bloat your install. No need to force anything there.

Second, you must have WiX v3.5 or less installed on your Visual Studio machine. Those attributes were added in WiX v3.6.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top