0

my issue is that the msbuild script can't find my MSI installer file. Here is the script file bootstrapper.msbuild :

<Project ToolsVersion="3.5"
   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="..\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>

The folders structure is as follows : enter image description here

The file boostrapper.msbuild is inside Mybootstrapper. I've tried the path using command line and it works fine. Why not in ms build ? Am I missing something ?

The question is what is the directory the task GenerateBootstrapper is referring to ?

Could you advice please ?

Sofiane
  • 908
  • 4
  • 19
  • 45

2 Answers2

0

It looks like your relative path is not correct. Try:

ApplicationFile="..\MySetup\bin\Debug\MySetup.msi"
Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
  • Sorry @Tom Blodget but I've tried this in vain...I've even put the msi file in the same directory of msbuild file in vain.. – Sofiane Oct 12 '14 at 09:55
0

The issue was I didn't put MSI file in the path where the generated setup.exe is located. I was thinking that this later will contain all files... Am I wrong ?

Sofiane
  • 908
  • 4
  • 19
  • 45