H Since the .NET tab in the "Add Reference ..." dialog does not show the assemblies form the GAC what is the common best practise to add a reference to an assembly that was installed in GAC to my visual studio project?
Asked
Active
Viewed 677 times
0
-
Are you sure your assembly isn't showing up in the '.NET' tab on the add-references dialog? – Will Dean Jan 14 '11 at 10:53
-
You may need to restart VS after installing the assemblies in the GAC, as new assemblies may not show in the list. – Oded Jan 14 '11 at 10:54
-
1Yes it is a commonly fallacy to think the "Add reference" dialog retrieves its assembly list form the GAC. This is not true, it gets it from some registry keys and special folders. – bitbonk Jan 14 '11 at 10:55
2 Answers
2
This article mentions the registry keys which you can modify to directly show the assemblies from GAC http://weblogs.asp.net/jdanforth/archive/2003/12/16/43841.aspx

Community
- 1
- 1

Madhur Ahuja
- 22,211
- 14
- 71
- 124
1
"Add Reference..." dialog modifies your project file (for example .csproj for C#). It is simple msbuild file. To add reference to your project you should modify node: Reference
<Reference Include="System.Data.Services">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>

Dao
- 2,784
- 3
- 28
- 36