I am deploying an user control by help of a MSI installer. The installer is created using WiX 3.8 and is supposed to install the control into the GAC on the users machine:
<Directory Id="D_GAC_PH" Name="GAC">
<Component Id="RT_PRODUCTDLL" Guid="CC18029F-3D4D-4C16-8871-88438DF5F8C1">
<!-- Runtime, assembly in GAC -->
<File Id="F_RT_PRODUCTDLL"
Name="control.dll"
Source="$(var.ProductDLLPath)"
KeyPath="yes"
Assembly=".net"/>
</Component>
</Directory>
In order for the control to show up in the "Add Components" list in Visual Studio there are several resources stating that for this to work, one needs to manually set certain keys to the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\AssemblyFolders\ProductName
The following WiX component does register the key just fine:
<RegistryKey
Root="HKLM"
Key="SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\$(var.CompanySafeName)">
<RegistryValue
Value="[$DT_ProductDLL]"
Type="string"/>
</RegistryKey>
Notice, I selected the key without the 'Wow6432' node. However, this key is actually the one expected for 32 bit systems. Testing on a 64 bit system the above (non-WoW) key leads to the correct (WOW6432Node) key to be added. I suppose, WiX / Windows /Windows Installer is redirecting the key to the correct WoW node on 64 bit. (?)
How reliable is that among different versions of WiX / Windows Installer? I would like this to work on older Windows Installer versions as well as on 32 bit system. Is this documented or specified somewhere? Or is it better to use conditionals in the WiX and decide for the keys manually?