1

my issue is that I don't know what to put in ItemGroup/BootstrapperFile for .net framework 4.5. Here is my file

<Project ToolsVersion="4.0"
   xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <ItemGroup>
        <BootstrapperFile Include="Microsoft.Windows.Installer.4.5" >
           <ProductName>Windows Installer 4.5</ProductName>
        </BootstrapperFile>
        <!--<BootstrapperFile Include="DotNetFX40" >
           <ProductName>Microsoft DotNet Framework 4.5 SP1</ProductName>
        </BootstrapperFile>-->
    </ItemGroup>

    <!-- from http://stackoverflow.com/questions/346175/use-32bit-program-files-directory-in-msbuild
    -->
    <PropertyGroup>
         <ProgramFiles32>$(MSBuildProgramFiles32)</ProgramFiles32> 
         <ProgramFiles32 Condition=" '' == '$(ProgramFiles32)'">$(ProgramFiles%28x86%29)</ProgramFiles32>
         <ProgramFiles32 Condition=" '' == '$(ProgramFiles32)'">$(ProgramFiles)</ProgramFiles32>
    </PropertyGroup>

    <Target Name="SetupExe">
        <GenerateBootstrapper
            ApplicationFile="C:\Projects\MySetup\MySetup\bin\Debug\MySetup.msi"
            ApplicationName="MyApplication"
            Culture="en"
            BootstrapperItems="@(BootstrapperFile)"
            ComponentsLocation="HomeSite"
            Path="$(ProgramFiles32)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\"
            OutputPath="output"/>
    </Target>

</Project>

I've read in the internet that what has to be referenced is a directory in Windows SDKs folder which is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A But then what is the use of giving a local folder while the bootstrapper should download the dependencies? Anyone knows a reference to use in BootstrapperFile ?

Thank you !

Sofiane
  • 908
  • 4
  • 19
  • 45

1 Answers1

2

The BootstrapperFile element identifies a package in the Packages subfolder of the @Path folder. The product.xml file under there specifies the files needed and where, if at all, they can be downloaded from. The reason they must exist there at build time is so the setup.exe can contain their checksums to validate at install time.

Downloading is up to the package author (and web site owner, of course). If you author your own, you might find the Bootstrapper Manifest Generator useful (if you can find it on the Internet—all the official links are dead).

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
  • I just wanna know is there any reference where to find what to put in the BootstrapperFile as Include and ProductName. I assume it's like maven so we need to have the exact name...which I don't know where to find... – Sofiane Oct 30 '14 at 14:21