You must first understand why you want to place an assembly to the GAC at all: the GAC holds strong named signed assemblies of various versions. Each .NET executable looks up
*at runtime* the directly or indirectly referenced assemblies in a well defined sequence, at one point also in the GAC. See
How the Runtime Locates Assemblies[
^].
When it is about
*developing* such applications that depend on other assemblies, you can, but do not need to reference it from the GAC
*at development time*. The reference is only used to first have access to the functionality exposed by the referenced assembly and secondly, to compile in the respective strong name into your application assembly. You may now have that assembly located in some persistent location (e.g. somewhere in ProgramFiles), then have it once registered in the GAC (running once as administrator: gacutil /i ...) and finally refer to the ProgramFiles assembly in your VS2010.
Note: the VS2010 does
*not* compile in any path to an assembly. Neither do all the references in your project get their way into the assembly - only the really needed ones get compiled into the application.
E.g. if you run
ildasm /text myApp.exe | more
, and look for
.extern
, you see which assemblies with what version, etc. are referenced. No path there, only the name, version, culture, public token.
Cheers
Andi