.net – WiX, hudson, msbuild, and installing .NET via a bootstrapper

hudsonmsbuildnetwix

I want to have our WiX installer that is currently building on a build server via hudson calling msbuild scripts to incorporate the full .NET 3.5 sp1 installer executable. It turns out that our users can always get access to a CD, but not always to the internet, so we can't use the over-the-net installer. We can also require that all of our users are running XP, which is good, because we're also requiring them to run .NET 3.5.

Our build server does not have a copy of Visual Studio installed, but just builds the project via MSBuild.

Following the WiX helpfile with version 3.0.5120, I've added this line to my wixproj:

<ItemGroup>
  <BootstrapperFile Include="dotnetfx.exe">
    <ProductName>.NET Framework 3.5 sp1</ProductName>
  </BootstrapperFile>
</ItemGroup>

as well as this line:

<Target Name="AfterBuild">
   <GenerateBootstrapper ApplicationFile="$(TargetPath)"
                      ApplicationName="MyApp"
                      BootstrapperItems="@(BootstrapperFile)"
                      ComponentsLocation="Relative"
                      CopyComponents="True"
                      OutputPath="$(OutputPath)"
                      Path="C:\downloads\"/>
</Target>

Yes, I realize that that 'path' is not what's in the help file, but that's because I don't have visual studio on the build server. What are the magic words to make this work?

Best Answer

To get the bootstrapper to install .net from a cd you need to change the components location to 'Absolute'.

You'll also need to install the platform sdk on the build machine to get the correct bootsrapper files. You would then point your 'Path' to the bootstrapper location in the platform sdk install, on my computer it is C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper