Adding assemblies to the Visual Studio "add reference" dialog (Collection)

Source: Internet
Author: User
ArticleDirectory
    • Add your assembly to Visual Studio
    • Multiple versions of same Assembly

When you attempt to add an Assembly reference to a Visual Studio project,Add referenceDialog appears with a list of registered global assemblies in. NetTab:

Add your assembly to Visual Studio

Unfortunately, adding your assembly to the Global Assembly Cache (GAC) does not make it automatically appear in the Visual Studio list of installed assemblies; you must add your Assembly manually as follows:

RunRegeditTo edit the Windows registry.

    1. Navigate toHKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \. netframework \ assemblyfoldersKey.
    2. Right click onAssemblyfoldersKey, then selectNew> key. Enter the name of your assembly (without the. dll extension ).
    3. Double click on the key's(Default)Value.Edit stringDialog will appear. Enter the full pathOf the folderWhere your Assembly resides. Note that all assemblies in that folder will appear in the Visual Studio list.
    4. Important! You must exit and restart Visual Studio to see your assembly inAdd referenceDialog.
Multiple versions of same Assembly

Note that if you add multiple versions of the same assembly to the GAC, And you want all versions to appear in the Visual Studio list of installed assemblies, you have two options:

    1. Provide a different name for each version of the Assembly, such as mylib1.0.dll and mylib2.0.dll, or
    2. Store each version of the Assembly in its own folder, and add each folder to the Registry as shown above.

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.