OrElse
OrElse

Reputation: 9969

How does the Visual studio populate the references tab?

How does the Visual studio populate the references tab?

By using something like currentDomain.GetAssemblies() or what?

Upvotes: 0

Views: 443

Answers (2)

Scott Dorman
Scott Dorman

Reputation: 42516

Which references "tab" are you referring to? The Add Reference dialog has a tab for .NET , COM, and Projects (plus the Browse and Recent tabs, which you probably aren't interested in.

The most obvious one is Projects, which simply shows you the projects in your solution that aren't already added as a reference to the current project.

For COM, it looks at all of the COM components which have registered TypeLibs from HKEY_CLASSES_ROOT\TypeLib.

The .NET tab uses the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders registry key for the list of folder paths. It also looks at %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies or %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies (again, depending on the version). If you have VS2008 installed, you can also add additional paths per project in the "Reference Paths" tab of the project properties.

Upvotes: 0

Daniel
Daniel

Reputation: 16464

Visual Studio will search for all assemblies in the "reference paths".

Reference paths can be defined per-project using a project property; but they can also be set in the registry. Take a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders.

Upvotes: 1

Related Questions