0
votes

I am using Visual Studio 2010 to create a WiX project. I want to install .net 3.5 for my software and .net 4.0 for WiX. I used the bootstrappers available with VS2010. It worked for the 4.0 version, but I have problems with the 3.5 version. Here are some lines from my code :

<BootstrapperFile Include=".NETFramework,Version=v4.0" >
  <ProductName>.NET Framework 4.0</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1" >
  <ProductName>.NET Framework 3.5 SP1</ProductName>
</BootstrapperFile>

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

First I had the error :

The install location for prerequisites has not been set to ‘component vendor’s web site’ and the file ‘dotNetFx35setup.exe’ in item ‘Microsoft.Net.Framework.3.5.SP1’ cannot be located on disk.

I followed the instructions found here :

http://sebastienlachance.com/blog/the-install-location-for-prerequisites-has-not-been-set-to-component-vendors-web-site-and-the-file-dotnetfx35setupexe-in-item-microsoftnetframework35sp1-cannot-be-located-on-disk

But now I have a new warning :

Item 'Microsoft.Net.Framework.3.5.SP1' could not be located in 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'.

I don’t understand what happens. I googled a lot and looked at similar questions, but didn’t find any precise answer… Does anybody have a solution, or is there another way to install prerequisites with WiX on VS2010 ?

Thanks !

2
I would reccomend targeting a single version of the .NET framework for your app and Wix custom actions so you only have to install a single framework package. Did you adjust the instructions for the SDK version 7.0A (replace any 6.0As from the instructions with 7.0A)?heavyd
Yes I adjusted the instructions. Concerning the single version of .NET : I really need to install both since WiX and my app don't need the same version... If I only install the 4.0 version, my app, which needs 3.5, won't run, right ?Alyra
That is correct, if your app targets 3.5, you need 3.5. Can you target your app to 4.0?heavyd
No, I can't target the app to 4.0. In fact, I can't do anything on the app, I have to adapt the installer...Alyra
Why do you need .NET 4.0 for Wix? Wix 3.5 does not require the .NET framework unless you have custom actions written in a .NET language. Also, can you include the <Product tag from C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\DotNETFX35SP1\product.xml?heavyd

2 Answers

0
votes

On a 64-bit system, the value of the Path attribute of the GenerateBootstrapper XML element should start with C:\Program Files (x86)\. You are missing the (x86) part.

You can check the bitness of your OS by hitting win+pause and examining the "System type".

0
votes

You have set the path as

Path="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\"

it may need to be

Path="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages"

Navigate to that path and make sure the bootstrapper packages are in fact there. Specifically, you should have a folder named something like DotNetFX35SP1 and inside it should be a Product.xml file that has the same product code element that matches your Bootstrapper include item. So...

<BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1" >

should match

ProductCode="Microsoft.Net.Framework.3.5.SP1"