Deployment in Visual Studio is required to add a custom system

Source: Internet
Author: User

"GuideProgram"Is a general installer, which can be configured to guide almost all the reusable components packaged as Windows Installer files or executable programs. It is programmed through a simple XML list that specifies all the metadata required for the bootstrap management component installation. The bootstrap does not specify the installer Technology (Windows Installer or clickonce) that the application must use ).

When you start setup.exe, it first checks whether all systems are installed. If a required system is missing, the pilot program displays an installation dialog box that lists the missing components and displays their license agreement. Otherwise, if all system requirements are detected, the bootstrap only needs to start the installation program of the application.

After accepting the license agreement, the user starts the download and installation process. After installing all the necessary systems, the Bootstrap program will close the installation process of the application itself.

Create a custom package

In some cases, you do not need to create a package for the reusable components. Generally, you only need to generate a package for the shared component or system component, which includes installing the file in GAC, performing global registration, or making up a Windows service.

You should ask whether the control provider can attach a redistributable file to the application. If a simple copy operation is sufficient to re-release essential components of the system (for example, if it does not have any dependencies), you do not need to create a package. You only need to ensure that the file is included in the installer, or set it to "Copy local" (CopyAttribute should be setTrue).

You should also determine whether the installer is required. If yes, use the Bootstrap program package.

To create a new component package, you must provide:

    • The file type.

    • The product list product. xml contains metadata of all non-specific languages of the package. It contains metadata common to all the localized versions of the reusable components.

    • Package. XML in the package list contains the metadata of a specific language. It usually contains localized error messages. You must provide at least one package list for each localized version of the component.

You must manually create a configuration file. The metadata contained in the configuration file must follow the specific architecture described by the "package architecture element" in the. NET Framework SDK. For more information about architecture references, see product and package architecture references. The installer Builder integrated with Visual Studio verifies the inventory file during production.

AvailableDependsonproductThe architecture element specifies the dependency between packages in these lists. An example of dependency is that to install the Visual J # Runtime Library, you must first install. NET Framework.

Then you must copy the product and package list files (as well as the redistributable files) to a specific folder that Visual Studio retains for the redistributable component package:

Copy code
 
\ Program Files \ Microsoft Visual Studio 8 \ SDK \ V2.0 \ bootstrapper

To write the installer that copies the reusable components and their lists to this folder, you can obtain the location of the bootstrapper folder from the following registry entries programmatically (read the registry key in the following order ):

Copy code
Hkcu \ Software \ Microsoft \ genericbootstrapper \ 1.0 \ pathhklm \ Software \ Microsoft \ genericbootstrapper \ 1.0 \ path

If neither of these two items exists, read the registry key to obtain the SDK installation location:

Copy code
 
HKLM \ SOFTWARE \ Microsoft \. NET Framework \ sdkinstallrootv2.0

Each reusable component is located in its own subfolders under the package directory. Then, add the product list and redistributable files to this subfolder. The localized version of the component and the package list are placed in the subfolder named by the "Regional name" (see the table in cultureinfo.

Once these files are copied to the bootstrapper folder, they will automatically appear in the required system dialog box of Visual Studio, so that developers can select them by selecting the check box.

For more information about using Bootstrap configuration installation, see msdn on the http://msdn.microsoft.com/msdnmag/issues/04/10/Bootstrapper/Article"Use the Visual Studio 2005 bootstrapper to kick-start your installation" (use the Visual Studio 2005 boot program to start installation ).

Ensure that the bootable program package can be retained from the application installation

The general rule is that all components in the reusable components of the Bootstrap program package should be separated from the applications using these components. For example, assume that you have a bootstrap package containing the acme. datawidgets. dll component named acme. datawidgets. MSI. Acme. datawidgets. dll should not appear in the bindir directory of the project during development and should not be deployed in the installation package of the application.

Therefore, it is recommended that you install the Bootstrap program component to the GAC on the development computer, and it is best to use the same core Bootstrap program package to reissue the component installer. This prevents the bootstrap components from being copied to the bindir directory of the project during development. In addition, we recommend that you define a redistlist file to describe all the Assembly contained in the bootable component package. This prevents any application deployment project from containing Bootstrap components. The redistlist file is only installed on the developer's computer.

To achieve this, create a list of reusable components in the redistlist folder of the. NET Framework directory (\ windows \ Microsoft. NET \ framework.

The redistributable component list is an XML file named in the following format: company_name + component_name + redistlist. xml. In this way, if the component name is "datawidgets" and the producer is "Acme", the component name is "Acme. datawidgets. redistlist. xml. Examples of the List of reusable components may be similar to the following:

Copy code
<? XML version = "1.0" encoding = "UTF-8"?> <Filelist redist = "Acme. datawidgets "> <file assemblyname =" Acme. dataGrid "version =" 1.0.0.0 "publickeytoken =" b03f5f7f11d50a3a "Culture =" neutral "processorarchitecture =" msil "ingac =" true "/> </filelist>
Add a package to the required system dialog box

The system essentials dialog box allows you to select the components required before the application is installed. Visual Studio contains many standard system requirements. However, you can add other Microsoft components or third-party components as a required system. To do this, you must create a list of products and packages as described above.

In the required system components dialog box, select required system components to install. The order of packages in this list depends on the dependency specified in the list and the installation sequence of the packages.

After a general package is added to the Bootstrap program, it will appear as "mypackage" in the "System essentials" dialog box. Visual Studio does not automatically select the package to install.

For clickonce projects, Visual Studio recommends that you select the. NET Framework check box by default in "select required system components to install" to provide. NET Framework for all project types. It also recommends that you provide the J # Runtime Library for the J # project.

for Windows Installer projects, if the current project is a setup project or websetup project, the ". NET Framework" check box is selected by default. If neither. NET Framework nor Windows installer package is selected during production, a warning is generated.

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.