In the "Add Reference" dialog box, Visual Studio never lists all assemblies from the GAC. It only lists the assemblies specified in a particular registry key. So you cannot reference any assembly directly from the GAC in your project, which sometimes gets really boring. But here comes Vitevic GAC Reference – just install this extension, and you will be able to reference GAC assemblies as easily as normal ones! In Visual Studio 2012 and 2013, a new menu item appears: "Add GAC Reference..." In Visual Studio 2010, you can use the plain old "Add Reference" dialog box with the new GAC tab:
The GAC assemblies list can be refreshed, sorted by any column, or filtered by assembly name or public key token:
Warning: Please keep in mindthat the content of the GAC on your machine will not match the content of the GAC on your user's machine. So you should reference GAC assemblies only if you are absolutely sure that they will be available in the user's GAC (e.g., if your product installer adds them). |