How to make your assemblies appear in Add Reference dialog box

We have developed a class library. Then we'll send this library to other teams. We want to make our library appear in the "Add Reference" dialog box in Visual Studio. So that the class library users can add references easily. Just like they add a reference to some system dlls, such as System.dll, System.Data.dll, etc. They just need to click their mouse several times, no copy/paste operations any more. But how? It seems it don't work even if we store out assemllies into the GAC.

Actually, it's very simple to implement the function. The "Add Reference" dialog box is just path-based and does not enumerate components from the GAC. We need to tell Visual Studio the path to the assembly. The detailed steps include:

  • Run regedit, and search for the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders.
  • Create a sub registry key with any name your prefer, and set the full path to the assembly as its default value.
  • Then you can see your assembly displayed in the "Add Reference" dialog box.

How to make your assemblies appear in Add Reference dialog box

How to make your assemblies appear in Add Reference dialog box

你可能感兴趣的:(reference)