RE: Trying to get reference from the GAC



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: Trying to get reference from the GAC
    ... I had assumed there was a way to say "look in the GAC" without giving it the ... 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)
  • Re: Property of Custom Control
    ... Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows ... You must add a reference to assembly ... TextBoxEx.cs: error CS0234: The type or namespace name ... When I am using Desktop assemblies I have no problem ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Project References (repost with fixed msdn alias)
    ... If we reference an assembly from some IDE known places. ... most famous IDE known folder for assemblies is, ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.general)
  • Re: Trying to get reference from the GAC
    ... The GAC is a deloyment choice and typically the first place that the runtime ... be a place that you reference assemblies in the development environment. ... running program but not for Visual Studio? ...
    (microsoft.public.vsnet.general)
  • Re: Assembly.Load(string name)
    ... i had a reference to this assembly from this ... the component and moved it to web app and it work. ... "How the Runtime Locates Assemblies" ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.languages.csharp)