devxlogo

Understanding VS.NET public and private assemblies

Understanding VS.NET public and private assemblies

As you might have noticed, the Add Reference dialog in Visual Studio displays all the assemblies in the GAC, which brings up the following question: is there a way to have this list display assemblies that aren’t in the GAC? The answer is yes, and the technique couldn’t be easier.

Use the REGEDIT utility to browse the following registry key:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio7.0AssemblyFolders _    PublicAssemblies

This key has a value that contains a path to a directory, for example:

C:Program FilesMicrosoft Visual Studio .NETCommon7IDEPublicAssemblies

It turns out that all the assemblies deployed in this directory appear in the Add Reference and the Object Browser’s Component Selector dialog box. These assemblies typically run inside the environment and are called by macros, add-ins, or user code. For example, this directory contains the extensibility.dll and VSlangProj.dll, which are wrappers around COM objects and that are used to create add-ins.

If you have assemblies that should run inside the environment but shouldn’t appear in the above dialog boxes and aren’t called by user code, you can deploy to another directory named PrivateAssemblies, for example:

C:Program FilesMicrosoft Visual Studio .NETCommon7IDEPrivateAssemblies

See also  Essential Measures for Safeguarding Your Digital Data
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist