This is a mirror of official site: http://jasper-net.blogspot.com/

Show Assemblies in the Add Reference Dialog Box

| Tuesday, July 19, 2011
AssemblyFolders.png

Add Reference Dialog Box

When you are developing software using the .NET framework, you can organise your code into assemblies. This is particularly useful when you are building code libraries. In this situation you can group related code into a single library assembly that is compiled into a dynamic linked library (DLL). This DLL can be referenced by any number of projects that need to use the library code.

When you want to use an external assembly from your project, you can add a reference to it using the Add Reference dialog box. This shows several lists of available assemblies in a tabbed arrangement. The .NET tab shows common assemblies including the standard .NET assemblies. The COM tab lists available COM components and the Projects tab shows the other projects within the solution. Depending upon the version of Visual Studio being used, you may also see a Recent tab, which shows the most recently referenced assemblies. Additionally, you have the option to browse the file system to find the DLL that you wish to use.

If you have built a code library containing a large number of DLLs, it can be frustrating to have to browse to the library folder and add references one by one. In versions of Visual Studio that include the recent items list, you may find that not all library DLLs are shown as the list size is limited. You can alleviate these problems by adding your own assemblies to the ".NET" list.


Adding Library Folders to the Add Reference Dialog Box

When you wish to add your own assemblies to the .NET tab of the dialog box, it is easiest to copy the DLLs into a single folder. You can segregate the DLLs into several folders but as they must be added one folder at a time, keeping them together makes the process easier. In the images in this article I have copied a DLL into the c:\Assemblies folder. To tell Visual Studio where the assemblies reside, you must edit the registry. To do so, run the program "regedit.exe".

NB: If you make a mistake whilst editing the registry you may leave the operating system unusable. If you are not comfortable editing the registry, you should not do so.

Read more: BlackWasp
QR: VSReferencesDialog.aspx

Posted via email from Jasper-net

0 comments: