How to Use Visual Studio. NET to create an installation package

Source: Internet
Author: User
This article describes how to create and install a package in the Visual Studio. NET development environment. In addition, this article also describes various types of installation projects and how to include files or dependencies in the installation program.


Back to the top deployment project type

There are five types of deployment projects: Merge Module projects, installation projects, Web installation projects, and cab projects. The Installation Wizard guides you through the process of creating a deployment project. The following are the rules that should be followed when selecting the correct deployment project type for the project.

Collapse the table
Expand the table
Project Type Purpose
Merge Module Project (. MSM) Package components that may be shared by multiple applications
Installation Project (. MSI) Generate an installer for a Windows-based application
Web installation project (. MSI) Generate an installer for a Web application
Cab Project (. Cab) Create a compressed file to download to the old Web Browser
Installation Wizard (. MSI) Help automatically create a deployment project mentioned earlier in this table

Merging module projects allows you to package files or components into one module for convenient sharing. The obtained. MSM file can be included in any other deployment project, but cannot be deployed independently.

The difference between an installation project and a web installation project is the location where the installation program is deployed:

  • For the installation project, the installer installs the file to the Program Files directory on the target computer.
  • For Web installation projects, the installer installs files to the virtual root directory on the Web server.

The cab project allows you to create a. cab file to package ActiveX components that can be downloaded from a Web server to a web browser.


Back to the top, how to create an installation package

  1. Start a new project in one of the following ways:

    • InFileMenu, pointingNewAnd then clickProject.

      -Or-

    • If you want to create an installation package for a project, open the project and right-clickSolutionMyproject
      (WhereMyprojectIs the name of your project), pointingAddAnd then clickCreate a project.
  2. InCreate a projectIn the dialog box, select "Install and deploy Project" in the "project type" pane, and select the desired installer type in the "template" pane.

    The project is added to Solution Explorer, andFile System Editor.

  3. InAttributeIn the dialog box, selectProductnameProperties, and then type the product name.


Back to the top, how to add files to the installation package

  1. InFile System Editor, SelectApplication folderNode.
  2. Right-clickApplicationsFolder, and thenOperationClickAdd,File. InAdd FileIn the dialog box, browse and select all files to be added to the application.

    Note:: If you already have an application project in your solution, do not selectFile, You can selectProject outputTo add project output.

  3. To add existing modules to the installation package (this is not possible for the cab project), right-click the name of the installation package in Solution Explorer. ClickAddAnd then clickMerge Module. InAdd ModuleIn the dialog box, browse and select all merging modules to be added to the application.


Back to Top
Reference

To add shortcuts to a project, browse the following Microsoft Knowledge Base Article: 307358 (http://support.microsoft.com/kb/3073...

To add shortcuts to a project, go to the following Microsoft Knowledge Base Article:

307358 (http://support.microsoft.com/kb/307358/) How to Create a. Net deployment project shortcut

To ensure that your files are correctly registered during installation, please refer to the following Microsoft Knowledge Base Article:

307367 (http://support.microsoft.com/kb/307367/) how to register COM objects in Visual Studio. NET
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.