Application Deployment Prerequisites
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
To ensure that your application will install and run successfully, you must first ensure that all components upon which your application is dependent are already installed on the target computer. For example, most applications created by using Visual Studio have a dependency on the .NET Framework; the correct version of the common language runtime must be present on the destination computer before the application is installed.
You can select these prerequisites in the Prerequisites Dialog Box and install the .NET Framework and other redistributables as a part of your installation. This practice is known as bootstrapping. Next, Visual Studio generates a Windows executable program named Setup.exe, also known as a bootstrapper. The bootstrapper is responsible for installing these prerequisites before your application runs. For more information about selecting these prerequisites, see Prerequisites Dialog Box.
Each prerequisite is a bootstrapper package. A bootstrapper package is a group of directories and files that contain manifest files that describe how the prerequisite should be installed. If your application prerequisites are not listed in the Prerequisite Dialog Box, you can create custom bootstrapper packages and add them to Visual Studio. Then you can select the prerequisites in the Prerequisites Dialog Box. For more information, see Creating Bootstrapper Packages.
By default, bootstrapping is enabled for ClickOnce deployment. The bootstrapper generated for ClickOnce deployment is signed. You can disable bootstrapping for a component, but you should do so only if you are sure that the correct version of the component is already installed on all target computers.
Bootstrapping and ClickOnce Deployment
Before installing an application on a client computer, ClickOnce will examine the client to ensure that it has certain requirements specified in the application manifest. These include the following:
The minimum required version of the common language runtime, which is specified as an assembly dependency in the application manifest.
The minimum required version of the Windows operating system required by the application, as specified in the application manifest using the
<osVersionInfo>element. (See <dependency> Element)
The minimum version of any and all assemblies that must be preinstalled in the global assembly cache (GAC), as specified by assembly dependency declarations in the assembly manifest.
ClickOnce can detect missing prerequisites, and you can install prerequisites by using a bootstrapper. For more information, see How to: Install Prerequisites with a ClickOnce Application.
To change the values in the manifests generated by tools such as Visual Studio and MageUI.exe, you need to edit the application manifest in a text editor, and then re-sign both the application and deployment manifests. For more information, see How to: Re-sign Application and Deployment Manifests.
If you use Visual Studio and ClickOnce to deploy your application, the bootstrapper packages that are selected by default depend on the version of the .NET Framework in the solution. However, if you change the target .NET Framework version, you must update the options in the Prerequisites Dialog Box manually.
|Target .NET Framework||Selected Bootstrapper Packages|
|.NET Framework 4 Client Profile||.NET Framework 4 Client Profile
Windows Installer 3.1
|.NET Framework 4||.NET Framework 4
Windows Installer 3.1
With ClickOnce deployment, the Publish.htm page generated by the ClickOnce Publish Wizard points either to a link that installs only the application or to a link that installs both the application and the bootstrapped components.
If you generate the bootstrapper by using the ClickOnce Publish Wizard or the Publish Page in Visual Studio, the Setup.exe is automatically signed. However, if you want to use your customer's certificate to sign the bootstrapper, you can sign the file later.
Bootstrapping and MSBuild
If you do not use Visual Studio, but compile your applications on the command line, you can create the ClickOnce bootstrapping application by using a Microsoft Build Engine (MSBuild) task. For more information, see GenerateBootstrapper Task.
As an alternative to bootstrapping, you can pre-deploy components using an electronic software distribution system, such as Microsoft Systems Management Server (SMS).
Bootstrapper (Setup.exe) Command Line Arguments
The Setup.exe generated by Visual Studio and the MSBuild tasks supports the following small set of command-line arguments. Any arguments supplied to the bootstrapping application beyond these are forwarded to the application installer.
If you change any bootstrapper options, you must change the unsigned bootstrapper and then sign the bootstrapper file later.
|Command Line Argument||Description|
|-?, -h, -help||Displays a Help dialog box.|
|-url, -componentsurl||Shows the stored URL and components url for this set up.|
||Sets the URL where Setup.exe will look for the ClickOnce application.|
||Sets the URL where Setup.exe will look for the dependencies, such as the .NET Framework.|
Operating System Support
The Visual Studio bootstrapper is not supported on Windows Server 2008 Server Core or Windows Server 2008 R2 Server Core, which provide a low-maintenance server environment with limited functionality. For example, the Server Core installation option only supports the .NET Framework 3.5 Server Core profile, so Visual Studio features that depend on the full .NET Framework cannot run.