I'm new to WixToolsets and I'm trying to understand the following line in one of our wxs files:
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>
Actually I thought that the element util:RegistrySearchRef does a registry search, but I don't get how Wix knows where to look inside the regsitry, because there's no key or anything else provided in this element. Are there some predefined RegistrySearchRefs where "NETFRAMEWORK45" belongs to? Because I couldn't find anything about that in the documentation. "NETFRAMEWORK45" is mentioned there as a property, but can you use such a property as a RegistrySearchRef Id?
Elements that end in
Refare "references" to elements of the same name with matchingIdattributes. That means there is aRegistrySearchin theutil's namespace with theId='NETFRAMEWORK45'.It turns out that
util:RegistrySearchexists in the NETFX extension that is provided with the WiX Toolset. All the complexity of finding the .NET Framework v4.5 registry key is implemented for you there. The WiX Toolset is open source, so you can search the source code and see how it is implemented... if you desire.To test: if you remove the reference to the NETFX extension from your build, you'll get an error saying that the registry search definition could not be found.