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

mmr*_*mmr 11 .net msbuild installer windows-installer offline

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

我需要将boostrapper完全自包含,完全没有Web访问权限.这个安装程序不允许要求Web; 我们有外地蒙古的客户(我很认真,不仅仅是使用地名,因为它很遥远)我们运送CD,因为他们根本没有互联网接入.

WiX教程指出:

<Target Name="AfterBuild">
    <GenerateBootstrapper ApplicationFile="$(TargetFileName)" 
                      ApplicationName="My Application Name"
                      BootstrapperItems="@(BootstrapperFile)"
                      ComponentsLocation="Relative"
                      CopyComponents="True"
                      OutputPath="$(OutputPath)"
                      Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\"/>
</Target>
Run Code Online (Sandbox Code Playgroud)

上述引导程序需要Web.如何制作不安装的安装程序?

Wim*_*nen 8

<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>
Run Code Online (Sandbox Code Playgroud)

在你的情况下,该$(bootstrapperPackagesFolder)变量将指向C :\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\.该$(cddir)变量是组成安装CD内容的文件夹.

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

我不确定我的例子是否与你已经做的不同; 也许你只是忘了DotNetFX35SP1在安装光盘上包含该文件夹?