Skip to content

Migrate Visual Studio Installer Projects Docs from 2010 to Current #4448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions docs/ide/package/application-deployment-prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
title: "Application Deployment Prerequisites | Microsoft Docs"
ms.date: "08/29/2011"
ms.topic: "conceptual"
helpviewer_keywords:
- "packaging"
- "packaging, overview"
ms.workload:
- "multiple"
---
application-deployment-prerequisites

# Application Deployment Prerequisites

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.

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**.

By default, bootstrapping is enabled for both Windows Installer deployment (by using Setup projects in Visual Studio) and ClickOnce deployment. The bootstrapper generated for Windows Installer deployment is not signed, but in ClickOnce deployment, the bootstrapper 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 Windows Installer Deployment

If you use Setup projects in Visual Studio to deploy your application, the default launch condition is the .NET Framework 4 Client Profile and the default selected bootstrapper package is the .NET Framework 4 Client Profile and Windows Installer 3.1. If your application targets a different version of the .NET Framework, you must update the prerequisite components in the **Prerequisites Dialog Box**.

If you generate the bootstrapper by using a Setup project in Visual Studio, the Setup.exe is not signed. However, you can use SignTool.exe to sign it.

## 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.

- 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.


> [!NOTE]
> <P>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.</P>


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.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th><p>Target .NET Framework</p></th>
<th><p>Selected Bootstrapper Packages</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p>.NET Framework 4 Client Profile</p></td>
<td><p>.NET Framework 4 Client Profile</p>
<p>Windows Installer 3.1</p></td>
</tr>
<tr class="even">
<td><p>.NET Framework 4</p></td>
<td><p>.NET Framework 4</p>
<p>Windows Installer 3.1</p></td>
</tr>
</tbody>
</table>

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](https://msdn.microsoft.com/en-us/library/ms164294).

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.

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th><p>Command Line Argument</p></th>
<th><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>-?, -h, -help</strong></p></td>
<td><p>Displays a Help dialog box.</p></td>
</tr>
<tr class="even">
<td><p><strong>-url, -componentsurl</strong></p></td>
<td><p>Shows the stored URL and components url for this set up.</p></td>
</tr>
<tr class="odd">
<td><p><strong>-url=</strong>location</p></td>
<td><p>Sets the URL where Setup.exe will look for the ClickOnce application.</p></td>
</tr>
<tr class="even">
<td><p><strong>-componentsurl=</strong>location</p></td>
<td><p>Sets the URL where Setup.exe will look for the dependencies, such as the .NET Framework.</p></td>
</tr>
<tr class="odd">
<td><p><strong>-homesite=</strong>true<strong>|</strong>false</p></td>
<td><p>When true, downloads the dependencies from the preferred location on the vendor's site. This overrides the <strong>-componentsurl</strong> setting. When false, downloads the dependencies from the URL specified by <strong>-componentsurl</strong>.</p></td>
</tr>
</tbody>
</table>

## 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.

## See Also

#### Concepts

[ClickOnce Security and Deployment](clickonce-security-and-deployment.md)

188 changes: 188 additions & 0 deletions docs/ide/package/choosing-a-deployment-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
---
title: "Choosing a Deployment Strategy | Microsoft Docs"
ms.date: "08/29/2011"
ms.topic: "conceptual"
helpviewer_keywords:
- "packaging"
- "packaging, overview"
ms.workload:
- "multiple"
---
choosing-a-deployment-strategy

# Choosing a Deployment Strategy

You can deploy Windows-based applications from Visual Studio by using either of the following technologies:

- ClickOnce.

- Windows Installer.

Use ClickOnce to publish the application to a centralized location. The user installs or runs the application from that location. Use Windows Installer to create an application installer file (.msi) and distribute that file. The users run the file to install the application.


> [!NOTE]
> <P>The deployment tools in Visual Studio are designed to handle typical enterprise deployment needs: they do not cover every possible deployment scenario. For more advanced deployment scenarios, you may require a third-party deployment tool or a software distribution tool such as <A href="http://go.microsoft.com/fwlink/?linkid=142133">Systems Management Server</A>.</P>


## Advantages of ClickOnce Deployment

In general, ClickOnce deployment simplifies the process of installing and updating an application. You can use the **Publish Wizard** to package your application and manifests, and to publish the application to a Web site or a network file share. Then, the users can install and start the application directly from that location in a single step.

Because ClickOnce deployed applications are self-updating, ClickOnce is the best choice for applications that require frequent updates. Users must have network connectivity to take advantage of ClickOnce update capabilities, although ClickOnce applications can be installed for the first time using a CD-ROM.

### Security in ClickOnce

ClickOnce security relies on Authenticode certificates to determine whether an application should be installed, a step known as a trust decision. Application and deployment manifests that describe an application can be signed with a certificate to prevent tampering.

Domain administrators can configure certificates to be trusted at the enterprise or machine level. If certificates are not trusted at the time of installation, ClickOnce deployment can be configured to ask users to make trust decisions. Once an application is installed, ClickOnce restricts the application permissions and actions as defined by the Internet, Local Intranet, or custom zones.

## Advantages of Windows Installer Deployment

Windows Installer deployment can advertise applications and features according to specific operating systems, install products on demand, and detect and reinstall damaged components. For more information about Windows Installer advertisement, see [Advertisement (Windows)](https://msdn.microsoft.com/en-us/library/aa367548).

To create a Windows Installer file (.msi) that is distributed to users, you can add a Visual Studio Setup project to your Visual Studio solution. In both scenarios, the user runs the installer file and steps through a wizard to install the application.

You can configure Visual Studio Setup projects by using the following designers: Customs Actions Editor, File System Editor, File Types Editor, Launch Condition Editor, Registry Editor, and User Interface Editor. Each editor enables you to specify the steps that occur on the target computer during installation.

### Security in Windows Installer

Windows Installer can use digital signatures to detect and correct corrupted resources. In Windows XP, Windows Installer is integrated with Software Restriction Policy to restrict both administrators and non-administrators from running program files based on the path, URL zone, hash, or publisher criteria. For more information, see [Windows Installer and Software Restriction Policy (Windows)](https://msdn.microsoft.com/en-us/library/aa372826). In Windows Vista, Windows Installer uses User Account Control Patching to make sure that the signature matches the certificate listed in the .msi resources. For more information, see [User Account Control (UAC) Patching](https://msdn.microsoft.com/en-us/library/aa372388).

## ClickOnce and Windows Installer Comparison Table

The following table compares the features of ClickOnce deployment and Windows Installer deployment.

<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="header">
<th><p>Feature</p></th>
<th><p>ClickOnce</p></th>
<th><p>Windows Installer</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p>Automatic update</p></td>
<td><p>Yes</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="even">
<td><p>Post-installation rollback1</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="odd">
<td><p>Update from Web</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="even">
<td><p>Does not affect shared components or other applications</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="odd">
<td><p>Security permissions granted</p></td>
<td><p>Grants only permissions necessary for the application (more safe)</p></td>
<td><p>Grants Full Trust by default (less safe)</p></td>
</tr>
<tr class="even">
<td><p>Security permissions required</p></td>
<td><p>Internet or Intranet Zone (Full Trust for CD-ROM installation)</p></td>
<td><p>Administrator</p></td>
</tr>
<tr class="odd">
<td><p>Application and deployment manifest signing</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="even">
<td><p>Installation-time user interface</p></td>
<td><p>Single prompt</p></td>
<td><p>Multipart Wizard</p></td>
</tr>
<tr class="odd">
<td><p>Installation of assemblies on demand</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="even">
<td><p>Installation of shared files</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="odd">
<td><p>Installation of drivers</p></td>
<td><p>No</p></td>
<td><p>Yes (with custom actions)</p></td>
</tr>
<tr class="even">
<td><p>Installation to Global Assembly Cache</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="odd">
<td><p>Installation for multiple users</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="even">
<td><p>Add application to <strong>Start</strong> menu</p></td>
<td><p>Yes</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="odd">
<td><p>Add application to Startup group</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="even">
<td><p>Add application to <strong>Favorites</strong> menu</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="odd">
<td><p>Register file types</p></td>
<td><p>Yes</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="even">
<td><p>Install time registry access</p></td>
<td><p>Limited</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="odd">
<td><p>Binary file patching</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="even">
<td><p>Application installation location</p></td>
<td><p>ClickOnce application cache</p></td>
<td><p><strong>Program Files</strong> folder</p></td>
</tr>
</tbody>
</table>

**Notes**

1\. With ClickOnce, rollback is available in **Add or Remove Programs** in Windows XP and **Programs and Features** in Windows Vista.

## See Also

#### Concepts

[ClickOnce Security and Deployment](clickonce-security-and-deployment.md)

[Visual Studio Installer Deployment](visual-studio-installer-deployment.md)

#### Other Resources

[Deploying Applications and Components](choosing-a-deployment-strategy.md)

Loading