C# Frequently Asked Questions

The C# team posts answers to common questions

Add Custom .NET Assemblies to the Add Reference Dialog

As you most likely know by now, the Add References dialog of Visual Studio .NET does not list each and every assembly on your machine, does not directly map to the Global Assembly Cache and does not list your custom assemblies. Typically this limitation is addressed by manually navigating to the *.dll of interest via the 'Browse' button.

However, if you wish to force VS.NET to display your custom assemblies within in the list maintained by the Add Reference dialog, all you need to do is place a copy of the assembly within the 'PublicAssemblies' folder located under C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE. Once you have done so, lo' and behold, your custom *.dlls are listed automatically.


Tip from Andrew Troelsen
Posted by: Duncan Mackenzie, MSDN
This post applies to Visual C# .NET 2002/2003

Published Wednesday, October 20, 2004 11:03 AM by CSharpFAQ
Filed under: , ,

Comments

 

John Lam said:

Personally, I just create .cmd files for each scenario. In most non-trivial scenarios there are other operations in a simple command-line build that must be done pre/post compile - hence the advantage of .cmd files.
October 20, 2004 12:00 PM
 

Heath Stewart said:

To better maintain your own third-party directory layout, you can add a key under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders where the default value is the path to the directory that contains your assemblies.

This also makes it easier for installations since detection of VS.NET and resolving the "PublicAssemblies" folder is unnecessary.
October 20, 2004 2:35 PM
 

Needs Improvement said:

If you want to add assemblies to the 'Add Reference' dialog in Visual Studio .NET, and your assemblies don't already have homes, use Andrew Troelsen's method. If your assemblies already have homes, though, use this method to add them wherever...
October 20, 2004 9:07 PM
 

Di .NET e di altre amenita' said:

October 21, 2004 5:54 AM
 

Di .NET e di altre amenita' said:

October 21, 2004 6:09 AM
 

六合彩 said:

November 3, 2004 2:16 AM
 

六合彩 香港六合彩 said:

六合彩 香港六合彩http://www.xgcpzx.com/
November 4, 2004 11:49 PM
 

六合彩 香港六合彩 said:

November 4, 2004 11:53 PM
 

RebelGeekz said:

December 28, 2004 4:54 AM
 

FAQ C# said:

May 2, 2005 9:34 AM
 

FAQ C# said:

May 2, 2005 10:08 AM
 

FAQ C# (par Yannick Lejeune) said:

August 23, 2005 5:25 AM
 

Add reference to your brand-new assembly in Visual Studio « devioblog said:

September 19, 2007 2:48 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker