• Adding Assemblies to the Visual Studio "Add Reference" Dialog(收集)


    When you attempt to add an assembly reference to a Visual Studio project, the Add Reference dialog appears with a list of registered global assemblies in the .NET tab:

    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:

    Run regedit to edit the Windows Registry.

    1. Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders key.
    2. Right click on the AssemblyFolders key, then select New > Key. Enter the name of your assembly (without the .dll extension).
    3. Double click on the key's (Default) value. The Edit String dialog will appear. Enter the full path of the folder where 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 in the Add Reference dialog.

    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.
  • 相关阅读:
    PHP程序员7小时学会Kotlin 第二小时
    PHP程序员7小时学会Kotlin系列
    PHP程序员7小时学会Kotlin系列
    技术人员如何形成正确的价值观
    景德镇特色的部门级别与权限
    hhvm的正确安装姿势 http://dl.hhvm.com 镜像
    有钱没钱
    SB心结
    优秀的技术Leader
    BaaS模式的开发思路
  • 原文地址:https://www.cnblogs.com/wuhenke/p/1936497.html
Copyright © 2020-2023  润新知