2014-01-17 82 views
5

我需要在安装之前检查.NET Framework。我已经添加了这个WiX中未解决的参考

<PropertyRef Id="NETFRAMEWORK40" /> 
     <Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again. Contact support at [email protected] if you have further issues."> 
      <![CDATA[Installed OR NETFRAMEWORK40]]> 
     </Condition> 

文件的开头包含

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
    xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 

和链接出现错误

错误LGHT0094:未解决的参考符号 “物业:NETFRAMEWORK40 '在产品:*'部分。

是否有我应该插入这些行的特定位置?我尝试了大部分我能想到的地方。

回答

7
  1. 您应该添加对WixNetfxExtension的引用。
  2. 改为使用属性NETFRAMEWORK40FULL。
+1

我还想补充一点,如果您使用light.exe手动构建,还需要在命令行中添加“-ext WixNetFxExtension” – roryok