RE: Trying to get reference from the GAC



I had assumed there was a way to say "look in the GAC" without giving it the
specific file location. Based on your post below I assume that works for a
running program but not for Visual Studio?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Steven Cheng[MSFT]" wrote:

Hi Dave,

From your description, you want to change the .NET framework system
assemblies' reference path (in Visual Studio IDE at development time) from
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" to their GAC location,
correct?

Based on my understanding, the system assemblies seems be particularly
processed in the Visual Studio's design-time and will always point to the
framework folder. Also, I don't think it is safe to redirect the reference
path to the GAC path since GAC path is in a customized folder "%system
dir%\assemblies" which is not intended to be used by user directly(other
than the .net clr runtime itself).

If you do want to share the same location of those framework assemblies, I
think you can consider the following means(though it is not documented and
not guranteed to work well):

** For Visual STudio 2005, you can manually add a registry entry to make a
custom folder become one of the search paths when you launch "Add
Reference" dialog in Visual Studio IDE

#Adding assemblies to the Add References dialog in Visual Studio 2005
http://blogs.msdn.com/astebner/archive/2005/11/28/497693.aspx

** You can move those assemblies you want to share the same physical path
to a custom folder and add that custom folder as one of the search path (as
above)

** In your project, you can try removing those existing reference to .net
framework assemblies and add new reference against the new place to see
whether it works.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



.



Relevant Pages

  • Re: Please explain why the GAC cannot be referenced
    ... Gac assemblies show up under the reference tab. ... Look through you referenced assemblies for the name of the assembly, ... Gac'd assemblies provide that function for you and the search order for assemblies starts at the gac to reduce performance issues. ... > old assembly from the GAC and install the newer version. ...
    (microsoft.public.dotnet.framework)
  • Re: Please explain why the GAC cannot be referenced
    ... A point I'll make here is that the GAC is really intended as a deployment ... So development tools generally don't refer to assemblies ... product install that developers typically don't want on the dev machine. ... reference assemblies from them that happen to be installed to the GAC. ...
    (microsoft.public.dotnet.framework)
  • Re: Please explain why the GAC cannot be referenced
    ... DLL in the GAC or in the individual projects, ... old assembly from the GAC and install the newer version. ... Now Im finding out that you cant reference the GAC, ... There are other locations that the framework will look for the assemblies as well, and those places are documented in the MSDN Library documentation. ...
    (microsoft.public.dotnet.framework)
  • Re: Please explain why the GAC cannot be referenced
    ... I know a lot of developers frown on using the GAC ... ... custom developed assemblies) ... I knew you could reference the GAC, ...
    (microsoft.public.dotnet.framework)
  • RE: Trying to get reference from the GAC
    ... assemblies' reference path (in Visual Studio IDE at development time) from ... the system assemblies seems be particularly ... I don't think it is safe to redirect the reference ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.vsnet.general)