如何使用完全独立的 .NET 3.5 sp1 安装程序制作 W

时间:2023-03-30
本文介绍了如何使用完全独立的 .NET 3.5 sp1 安装程序制作 WiX 安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将完整的 .NET 3.5 sp1 安装程序包含在我的安装程序中,该安装程序位于 WiX 中.

I need to include the full .NET 3.5 sp1 installer into my installer, which is in WiX.

我需要这个 boostrapper 完全独立,完全不能访问网络.只是不允许此安装程序需要网络;我们在外蒙古有客户(我是认真的,不只是使用地名,因为它是偏远的)我们向他们运送 CD,因为他们根本无法访问互联网.

I need that boostrapper to be entirely self contained, with no web access at all. It is just not allowed for this installer to require the web; we have customers in outer Mongolia (I'm serious, not just using the place name because it's remote) to whom we ship CDs because they do not have internet access at all.

WiX 教程指出:

<Target Name="AfterBuild">
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" 
                      ApplicationName="My Application Name"
                      BootstrapperItems="@(BootstrapperFile)"
                      ComponentsLocation="Relative"
                      CopyComponents="True"
                      OutputPath="$(OutputPath)"
                      Path="C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper"/>
</Target>

上述引导程序需要网络.如何制作没有的安装程序?

The above bootstrapper requires the web. How do I make an installer that does not?

推荐答案

<Project ToolsVersion="3.5"
   xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <ItemGroup>
        <BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1" >
           <ProductName>.NET Framework 3.5 SP1</ProductName>
        </BootstrapperFile>
        <BootstrapperFile Include="Microsoft.Windows.Installer.3.1" >
           <ProductName>Windows Installer 3.1</ProductName>
        </BootstrapperFile>
    </ItemGroup>

    <Target Name="setup">
        <GenerateBootstrapper
            ApplicationFile="myproduct.msi"
            ApplicationName="myproduct"
            BootstrapperItems="@(BootstrapperFile)"
            Path="$(bootstrapperPackagesFolder)"
            ComponentsLocation="Relative"
            OutputPath="$(cddir)"
            Culture="en"/>
    </Target>

</Project>

在您的情况下,$(bootstrapperPackagesFolder) 变量将指向 C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper.$(cddir) 变量是您编写安装 CD 内容的文件夹.

In your case, the $(bootstrapperPackagesFolder) variable would point to C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper. The $(cddir) variable is the folder where you compose the content of your installation CD.

GenerateBootStrapper 任务不仅会生成引导程序 exe,还会将 DotNetFX35SP1WindowsInstaller3_1 文件夹复制到同一位置.在安装过程中,引导程序 exe 将查找这些文件夹并使用其中的文件,而不是下载它们.

The GenerateBootStrapper task will not only generate a bootstrapper exe, but will also copy a DotNetFX35SP1 and a WindowsInstaller3_1 folder to the same location. During installation, the bootstrapper exe will look for those folders and use the files in there, rather than downloading them.

我不确定我的示例是否与您已经在做的不同;也许您只是忘记在安装 CD 上包含 DotNetFX35SP1 文件夹?

I'm not sure if my example is different from what you are already doing; maybe you just forgot to include the DotNetFX35SP1 folder on the installation CD?

这篇关于如何使用完全独立的 .NET 3.5 sp1 安装程序制作 WiX 安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:使用 Microsoft.Build.Evaluation 发布数据库项目 (.sql 下一篇:从 MSBUILD 脚本获取次要版本和主要版本

相关文章

最新文章