codebrothers.net :: Home  >  Matthias Denkmaier
User: Guest  Login
Matthias Denkmaier
C# - what else?
Blog search:  
How to: Display assembly in the VS.NET Add Reference dialog box

When you are developing custom class libraries you may want users to be able to pick them directly from the Add Reference dialog box in Visual Studio rather then have them browse for it.

 

For this purpose it is not enough to just add the assembly to Global Assambly Cache (GAC), because the Visual Studio Add Reference dialog box is file/path based and does not use the GAC to list all available/installed assemblies.

 

To display your custom assembly in the Add Reference dialog you have to add a custom registry key and a default value to point at the location of your assembly:

 

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\<custom_name>]@="<full_path_of_location_of_your_assembly>"

 

Instead of using [HKEY_CURRENT_USER] you could also use [HKEY_LOCAL_MASCHINE] to display the assembly to all users of the maschine.

 

It should look like this:

 

Add custom assembly to Add Reference dialog

 

Note: You have to restart Visual Studio .NET after creating the registry key to make the changes work.

 

Share this post: Email it!
Posted:  5/7/2007 5:55:39 PM  by  mdenkmaier
Tags:  How toVisual Studio
No comments, yet!
Leave a Comment

Name required

Your URL

Comments (required)