任何关于如何在Wix中处理.Net 4.7的想法?文档只显示支持462,除非我漏了什么。http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html我找到了这个:http://dblock.github.io/dotnetinstaller/但我从未使用过。任何建议将不胜感激!谢谢!
<PackageGroupRef Id="NetFx47Redist"/>
后正常工作。这需要离线安装程序(从NetFx47RedistLink下载)存在于相对源路径..\Redist\NETFX47文件夹中进行捆绑编译。您还需要在捆绑的引用中添加NetFxExtension,并在bundle wxs中添加`xmlns:netfx='http://schemas.microsoft.com/wix/NetFxExtension'。<Fragment>
<?define NetFx47MinRelease = 460798 ?>
<?define NetFx47WebLink = http://download.microsoft.com/download/A/E/A/AEAE0F3F-96E9-4711-AADA-5E35EF902306/NDP47-KB3186500-Web.exe ?>
<?define NetFx47RedistLink = http://download.microsoft.com/download/D/D/3/DD35CC25-6E9C-484B-A746-C5BE0C923290/NDP47-KB3186497-x86-x64-AllOS-ENU.exe ?>
<?define NetFx47EulaLink = http://referencesource.microsoft.com/license.html ?>
<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx47Redist" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx47EulaLink)" Overridable="yes" />
<WixVariable Id="NetFx47RedistDetectCondition" Value="NETFRAMEWORK45 >= $(var.NetFx47MinRelease)" Overridable="yes" />
<WixVariable Id="NetFx47RedistInstallCondition" Value="" Overridable="yes" />
<WixVariable Id="NetFx47RedistPackageDirectory" Value="Redist\NETFX47\" Overridable="yes" />
<PackageGroup Id="NetFx47Redist">
<ExePackage
DisplayName="Microsoft .NET Framework 4.7"
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx47FullLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx47FullLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx47FullLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx47RedistDetectCondition)"
InstallCondition="!(wix.NetFx47RedistInstallCondition)"
Id="NetFx47Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
DownloadUrl="$(var.NetFx47RedistLink)"
LogPathVariable="NetFx47FullLog"
Compressed="no"
SourceFile="..\Redist\NETFX47\NDP47-KB3186497-x86-x64-AllOS-ENU.exe"
Name="!(wix.NetFx47RedistPackageDirectory)NDP47-KB3186497-x86-x64-AllOS-ENU.exe"
>
</ExePackage>
</PackageGroup>
</Fragment>
xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'
。 <util:RegistrySearch
Id="NETFRAMEWORK45"
Variable="NETFRAMEWORK45"
Root="HKLM"
Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
Value="Release"
Result="value"
/>