我想让我们的 WiX 安装程序通过 hudson 调用 msbuild 脚本在构建服务器上构建,以合并完整的 .NET 3.5 sp1 安装程序可执行文件。事实证明,我们的用户总是可以访问 CD,但不能总是访问 Internet,因此我们不能使用 over-the-net 安装程序。我们还可以要求所有用户都运行 XP,这很好,因为我们还要求他们运行 .NET 3.5。
我们的构建服务器没有安装 Visual Studio 的副本,而只是通过 MSBuild 构建项目。
在 3.0.5120 版本的 WiX 帮助文件之后,我将这一行添加到我的 wixproj 中:
<ItemGroup>
<BootstrapperFile Include="dotnetfx.exe">
<ProductName>.NET Framework 3.5 sp1</ProductName>
</BootstrapperFile>
</ItemGroup>
以及这一行:
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(TargetPath)"
ApplicationName="MyApp"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
CopyComponents="True"
OutputPath="$(OutputPath)"
Path="C:\downloads\"/>
</Target>
是的,我意识到“路径”不是帮助文件中的内容,但那是因为我在构建服务器上没有 Visual Studio。有什么神奇的词来完成这项工作?