Latest Replies
Thursday
Sep102009

Problems with Bootstrapper, WiX 3.0 and .NET 3.5 SP1

Problem: MSBuild fails to generate bootstrapper installing .NET 3.5 SP1 before the MSI. Task might look like:

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

<Target
  Name="Bootstrapper"
  Inputs="$(OutDir)$(TargetFileName)"
  Outputs="$(OutDir)\$(OutputName)_Setup.exe"
  Condition=" '$(OutputType)'=='Package' ">
  <GenerateBootstrapper
    ApplicationName="Product Name"
    ApplicationFile="$(DeploymentPackageName).msi"
    ApplicationUrl="$(DeploymentRootUrl)"
    BootstrapperItems="@(BootstrapperFile)"
    ComponentsLocation="HomeSite"
    OutputPath="$(OutputPath)"
    Culture="en-US"
    Path="$(BootstrapperFiles)" />  
</Target>

Produced error would look like:

error MSB3152: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\aspnet.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information.

Solution: Make sure that the root Project element of MSBuild file has ToolsVersion="3.5".

For the sample of complete file you can check out part of the Lokad.Excel.2007 build script that is used to generate bootstrapper executables on every deployment build.

Note: WiX 3.5 promises to bring along its own bootstrapper named Burn. It looks promising but still has a lot of time to go.

I miss apt-get sometimes.

« Concurrency Programming is Like Thinking in 5 Dimensions | Main | Host .NET Applications on Rackspace Cloud Servers with Mono »

Reader Comments (6)

Hi Rinat, I'm new to WiX, I'm having the issue you describe here, which would it be the MSBuild file to look at? Also, where do you set the value for $(BootstrapperFiles)? I have to put the whole path (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper) for it to work... well, for it to show me the error you describe.

Thanks
Nabani

September 18, 2009 | Unregistered CommenterNabani Silva

Hi Rinat,
this code ist working fine to create a bootstrapper for .NETFRAMEWORK35 but not for .NETFRAMEWORK35 SP1.
I am using WIX v3.0. i checked my bootstrapper packages. There i have folder with name DotNetFX35.
How you solved it?

Best Regards
Adnan

September 18, 2009 | Unregistered CommenterAdnan

This worked for me:

http://geekrick.blogspot.com/2008/08/frustrating-net-framework-sp1-issue.html

After doing that, the .net framework package is copied into your installation folder (which I don't want), even if you use HomeSite as the ComponentsLocation value, that's because the packagefile elements at "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX35SP1\product.xml" don't contain a HomeSite attribute, what I did was to add the same HomeSite attribute to all packagefile elements:

<PackageFile HomeSite="DotNetFX35SP1Exe" Name="dotNetFX20\aspnet.msp" PublicKey="3082010.....10001" />

Hope it helps.

Regards,
Nabani

September 19, 2009 | Unregistered CommenterNabani Silva

Folks,

For the sample of complete file you can check out part of the Lokad.Excel.2007 build script that is used to generate bootstrapper executables on every deployment build.

In short, make sure to have ToolsVersion attribute set properly on the root Project element. You need to make sure that you've got the development SDKs installed as well (they are installed by default with VS 2008).

September 19, 2009 | Registered CommenterRinat Abdullin

Hi Nabani,
i just followed this link and it works for me too. Thanks a lot.
It creats automatically DotNetFX35SP1 and WindowsInstaller3_1 folder in my project with all other required files.
Q: It means we have to deliever DotNetFX35SP1 and WindowsInstaller3_1 folder with the other setup files to customer, right???
Q: I am just setting six attributes, is it a right way??? the code is as follow
<Target Name="AfterBuild">
<GenerateBootstrapper ApplicationFile="$(OutputName).msi"
ApplicationName="myProduct"
BootstrapperItems="@(BootstrapperFile)"
ComponentsLocation="Relative"
OutputPath="$(OutputPath)"
Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper" />
</Target>

Best Regards
Adnan

September 21, 2009 | Unregistered CommenterAdnan

I am using WIX v3.0. i checked my boot strapper packages. There i have folder with name DotNetFX35.thanks for this post.

Comments for this entry have been disabled. Additional comments may not be added to this entry at this time.