完整的维克斯样品* .wxs下载并安装.NET Framework的特定版本,如果它是不可用 [英] Complete WiX sample *.wxs to download and install a specific version of .NET Framework if it's not available

查看:231
本文介绍了完整的维克斯样品* .wxs下载并安装.NET Framework的特定版本,如果它是不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多不完整的问题和解答有关如何下载和安装.NET Framework(S),如果他们不提供,但没有完整的code似乎可从因特网。

There are many incomplete questions and answers about how to download and install .NET Framework(s) if they are not available but none complete code seems to be available on Internet.

你能提供一个最小的编译code或链接到一个明显的例子,其产生的setup.exe / MSI?我不认为RTFM适用于这个问题,因为MSI和引导安装有很多特质是不容易的免赔额。

Can you provide a minimal compilable code or a link to a clear example that generates a setup.exe/MSI? I don't think RTFM applies to this question since MSI and bootstrap installers has a lot of idiosyncrasies that are not easily deductible.

推荐答案

请注意,这些信息的的完全手册中找到。它可在以下位置发现的例子:

Note, this information is available in full in the manual. It can be found in the following locations with examples:

如何:安装.NET Framework使用刻录

如何:检查.NET框架版本

WixNetfxExtension

话虽这么说

使用WiX的,你不能产生MSI进行安装.Net [X]。你可以,但是,用它来生成一个自举安装程序可执行文件。

Using WiX, you cannot generate an MSI to install .Net [X]. You can, however, use it to generate a bootstrapped installer executable.

幸运的是,包括.NET安装程序是在维克斯包项目平凡简单。只要有一个参考的 WixNetFxExtension.dll (应该是[维克斯安装位置] \ BIN的)在你的包项目,然后包括在下面的<链>

Luckily, including the .Net installer is trivially simple in a WiX Bundle project. Simply include a reference to the WixNetFxExtension.dll (should be in "[Wix Install location]\bin") in your bundle project, and then include the following in your <Chain>:

<PackageGroupRef id="[.Net package]" />

其中, [网包。] 是:

  • NetFx40Web
  • NetFx40Redist
  • NetFx40ClientWeb
  • NetFx40ClientRedist
  • NetFx45Web
  • NetFx45Redist

例如,一包是包含.NET 4.5的Web安装程序:

For example, a bundle that includes the .Net 4.5 Web installer:

<Bundle Name="E.G." Version="1.0.0.0" Manufacturer="Me" UpgradeCode="[Guid]">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
    <Chain>
        <PackageGroupRef Id="NetFx45Web" />
        <MsiPackage SourceFile="$(var.ExampleInstaller.TargetPath)" />
    </Chain>
</Bundle>

如果你正在使用的Redist包,你可以运行 -layout 编译安装程序,下载文件,使他们可以刻录到CD / DVD (使用标准Bootsrapper应用,定制引导程序应用可以或可以不具有相似的功能)

And if you are using the Redist packages, you can run the compiled installer with -layout to download the files so that they can be burned to a CD/DVD (using the Standard Bootsrapper application, custom bootstrapper applications may or may not have similar functionality).

这篇关于完整的维克斯样品* .wxs下载并安装.NET Framework的特定版本,如果它是不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆