C # How to register COM components in the installation project

Source: Internet
Author: User

This simple problem seems to be confusing for many people. I have been troubled before, and it is not ideal to try to use methods such as adding a registry or adding a post-event mini-program registration in the installation program.

Later, I found this problem extremely simple. I was ashamed to share it with you so that fewer people can take too many detours.

The method is as follows:

1. Create an installation project

2. Add the file to be installed (the installation project automatically determines its dependency, but this is not enough)

3. register the component. This is what we note in this article. First, select the component you want to register and view its properties. There is an item named "register" in it. Selecting the corresponding option installer will help you complete the corresponding registration. ^_^

Set

Description

Donotregister

You do not need to register.

Com

Register an item as a COM object.

Comrelativepath

Register an item as an independent COM object.

Comselfreg

When installing an item, the item will be self-registered as a COM object. The Assembly is unavailable.

Font

When the installation file is installed, the file is registered as a font file.

 

It's that simple. I believe everyone will do it.

 

There may be a small problem, that is, after the first re-registration, the generated solution component disappears. In this case, you need to introduce the component again, register and generate the component, and there will be no problem.

 

 

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.