Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Provides an automated way to detect, download, and install an application and its prerequisites. It serves as a single installer that integrates the separate installers for all the components making up an application.
Task Parameters
The following table describes the parameters of the GenerateBootstrapper task.
ApplicationFileOptional
Stringparameter.Specifies the file the bootstrapper will use to begin the installation of the application after all prerequisites have been installed. A build error will result if neither the
BootstrapperItemsnor theApplicationFileparameter is specified.ApplicationNameOptional
Stringparameter.Specifies the name of the application that the bootstrapper will install. This name will appear in the UI the bootstrapper uses during installation.
ApplicationRequiresElevationOptional
Booleanparameter.If
true, the component runs with elevated permissions when it is installed on a target computer.ApplicationUrlOptional
Stringparameter.Specifies the Web location that is hosting the application’s installer.
BootstrapperComponentFilesOptional
String[]output parameter.Specifies the built location of bootstrapper package files.
BootstrapperItemsOptional ITaskItem
[]parameter.Specifies the products to build into the bootstrapper. The items passed to this parameter should have the following syntax:
<BootstrapperItem Include="ProductCode"> <ProductName> ProductName </ProductName> </BootstrapperItem>The
Includeattribute is used to represent the name of a prerequisite which should be installed. TheProductNameitem metadata is optional, and will be used by the build engine as a user-friendly name in case the package cannot be found. These items are not required MSBuild input parameters unless noApplicationFileis specified. You should include one item for every prerequisite which must be installed for your application.A build error will result if neither the
BootstrapperItemsnor theApplicationFileparameter is specified.BootstrapperKeyFileOptional
Stringoutput parameter.Specifies the built location of setup.exe
ComponentsLocationOptional
Stringparameter.Specifies a location for the bootstrapper to look for installation prerequisites to install. This parameter can have the following values::
HomeSite: Indicates that the prerequisite is being hosted by the component vendor.Relative: Indicates that the preqrequisite is at the same location of the application.Absolute: Indicates that all components are to be found at a centralized URL. This value should be used in conjunction with theComponentsUrlinput parameter.If
ComponentsLocationis not specified,HomeSiteis used by default.
ComponentsUrlOptional
Stringparameter.Specifies the URL containing the installation prerequisites.
CopyComponentsOptional
Booleanparameter.If
true, the bootstrapper copies all output files to the path specified in theOutputPathparameter. The values of theBootstrapperComponentFilesparameter should all be based on this path. Iffalse, the files are not copied, and theBootstrapperComponentFilesvalues are based on the value of thePathparameter. The default value of this parameter istrue.CultureOptional
Stringparameter.Specifies the culture to use for the bootstrapper UI and installation prerequisites. If the specified culture is unavailabe, the task uses the value of the
FallbackCultureparameter.FallbackCultureOptional
Stringparameter.Specifies the secondary culture to use for the bootstraper UI and installation prerequisites.
OutputPathOptional
Stringparameter.Specifies the location to copy setup.exe and all package files.
PathOptional
Stringparameter.Specifies the location of all available prerequisite packages.
SupportUrlOptional
Stringparameter.Specifies the URL to provide should the bootstrapper installation fail
ValidateOptional
Booleanparameter.If
true, the bootstrapper performs XSD validation on the specified input bootstrapper items. The default value of this parameter isfalse.
Remarks
In addition to the parameters listed above, this task inherits parameters from the TaskExtension class, which itself inherits from the Task class. For a list of these additional parameters and their descriptions, see TaskExtension Base Class.
Example
The following example uses the GenerateBootstrapper task to install an application that must have the .NET Framework 2.0 installed as a prerequisite.
<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BootstrapperFile Include="Microsoft.Net.Framework.2.0">
<ProductName>Microsoft .NET Framework 2.0</ProductName>
</BootstrapperFile>
</ItemGroup>
<Target Name="BuildBootstrapper">
<GenerateBootstrapper
ApplicationFile="WindowsApplication1.application"
ApplicationName="WindowsApplication1"
ApplicationUrl="http://mycomputer"
BootstrapperItems="@(BootstrapperFile)"
OutputPath="C:\output" />
</Target>
</Project>