Search code examples
.netvisual-studiovisual-studio-2010gac

*WHY* doesn't Visual Studio allow you to make a reference to an assembly in the GAC?


There have been several questions that have answered the HOW or more precisely how to get around this Visual Studio limitation:

GAC Assembly Missing in Add Reference dialog How can I reference a dll in the GAC from Visual Studio?

The MSDN documentation though says:

You cannot add references from the Global Assembly Cache (GAC), as it is strictly part of the run-time environment.

So it seems that the Visual Studio team did this on purpose. Maybe they did this so you don't hurt yourself? What best practice am I violating by referencing an assembly in the GAC using an VS extension like this? Am I missing something?

Just double-checking with the community, appreciate your thoughts.


Solution

  • With Sharp Develop (which is an open source IDE for .NET) you could add GAC references, with .NET 4 you could add GAC references. You definitely won't hurt yourself by adding GAC references. I don't have any negative feedback from developers using it.

    Soon this extension will have more sexy features.