如果检查.NET Framework版本是否存在,我们是否需要在WiX 3.11安装程序中添加RegistrySearc



在旧版本的WiX中,我看到了以下xml片段,用于检查是否存在.NET Framework 4.0并在操作系统上不存在.NET Framework时中止安装。但是在这个关于如何:检查.NET Framework Versions的官方文档中没有提到任何RegistrySearch元素。问题:注册表搜索元素是否仍需要包含在此处,或者WiX的最新版本3.11中不需要它?

<Property Id="VSTORUNTIMEREDIST">
<RegistrySearch
Id="VSTORuntimeRedist"
Root="HKLM"
Key="SOFTWAREMicrosoftVSTO Runtime Setupv4R"
Name="Version"
Type="raw" />
</Property>
<Condition
Message="The Visual Studio 2010 Tools for Office Runtime is not installed. Please download and install from http://www.microsoft.com/en-us/download/details.aspx?id=20479.">
<![CDATA[Installed OR VSTORUNTIMEREDIST>="10.0.30319"]]>
</Condition>
<PropertyRef Id="NETFRAMEWORK40FULL"/>
<Condition Message="This application requires .NET Framework 4.0.">
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>

在代码中,RegistrySearch 与 Visual Studio 2010 Tools for Office Runtime 相关,而不是 .NET Framework。 测试是否存在 .NET 不需要它。

最新更新