473,383 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Adding a reference from the GAC.

Hello, an assembly I want to reference is installed in the GAC and
doesn't have a local copy (e.g. somewhere that is not
c:\windows\assembly...). How do I reference it from VS2005?
Jun 27 '08 #1
8 1762
On Apr 24, 12:54 pm, Frank Rizzo <n...@none.netwrote:
Hello, an assembly I want to reference is installed in the GAC and
doesn't have a local copy (e.g. somewhere that is not
c:\windows\assembly...). How do I reference it from VS2005?

Add Reference.. in the .NET tab you should see if it is registered in
GAC
Jun 27 '08 #2
On Apr 24, 12:54*pm, Frank Rizzo <n...@none.netwrote:
Hello, an assembly I want to reference is installed in the GAC and
doesn't have a local copy (e.g. somewhere that is not
c:\windows\assembly...). *How do I reference it from VS2005?
Hi,

You should see it in the .NET tab of the Add Reference dialog
Jun 27 '08 #3
On Apr 24, 1:28 pm, "Ignacio Machin ( .NET/ C# MVP )"
<ignacio.mac...@gmail.comwrote:
You should see it in the .NET tab of the Add Reference dialog
I don't believe this is true. Just because something is in the GAC
does not mean that it will appear in the .net tab of the Add
References dialog.

It would be quite reasonable for someone to install an assembly in the
GAC but not want it available for use by other developers.

Chris
Jun 27 '08 #4
If you set a reference to a local copy of the assembly, .NET always checks
the GAC first, I believe.
-- Peter
To be a success, arm yourself with the tools you need and learn how to use
them.

Site: http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://ittyurl.net
"Frank Rizzo" wrote:
Hello, an assembly I want to reference is installed in the GAC and
doesn't have a local copy (e.g. somewhere that is not
c:\windows\assembly...). How do I reference it from VS2005?
Jun 27 '08 #5
On Apr 24, 3:08*pm, Chris Dunaway <dunaw...@gmail.comwrote:
On Apr 24, 1:28 pm, "Ignacio Machin ( .NET/ C# MVP )"

<ignacio.mac...@gmail.comwrote:
You should see it in the .NET tab of the Add Reference dialog

I don't believe this is true. *Just because something is in the GAC
does not mean that it will appear in the .net tab of the Add
References dialog.

It would be quite reasonable for someone to install an assembly in the
GAC but not want it available for use by other developers.

Chris
I'm not 100% sure if that is true, it might be some config setting
that declare an assembly "hidden" in the GAC, or more precisely a flag
that mark it as "do not show in the list"
I do not think it does exist though.
The GAC is intended to be shared, if you want to have a private
assembly just do not put it there.
Jun 27 '08 #6
On Thu, 24 Apr 2008 09:54:47 -0700, Frank Rizzo <no**@none.netwrote:
>Hello, an assembly I want to reference is installed in the GAC and
doesn't have a local copy (e.g. somewhere that is not
c:\windows\assembly...). How do I reference it from VS2005?
You can add the reference from the DLL in the GAC. The GAC is just a
series of folders with a special naming convention.

Let's say you're looking for an assembly called MyLib.dll. To see
where the DLL is stored, just open a command prompt and type the
following commands:

c:
cd \windows\assembly
dir MyLib.dll /s
Jun 27 '08 #7
Ignacio Machin ( .NET/ C# MVP ) wrote:
On Apr 24, 3:08 pm, Chris Dunaway <dunaw...@gmail.comwrote:
>On Apr 24, 1:28 pm, "Ignacio Machin ( .NET/ C# MVP )"

<ignacio.mac...@gmail.comwrote:
>>You should see it in the .NET tab of the Add Reference dialog
I don't believe this is true. Just because something is in the GAC
does not mean that it will appear in the .net tab of the Add
References dialog.

It would be quite reasonable for someone to install an assembly in the
GAC but not want it available for use by other developers.

Chris

I'm not 100% sure if that is true, it might be some config setting
that declare an assembly "hidden" in the GAC, or more precisely a flag
that mark it as "do not show in the list"
I do not think it does exist though.
The GAC is intended to be shared, if you want to have a private
assembly just do not put it there.
Chris is absolutely correct. Just because the assembly is in the GAC
does not mean that it will be available in the Add Reference... dialog.
The contents of the Add Reference .NET tab are defined by registry
keys that list the folders to interrogate.

The question is how does one reference a DLL that does not show in the
..NET tab. SharpDevelop, for instance, also has a GAC tab (in addition
to the .NET tab).
Regards
Jun 27 '08 #8
You could use the dir <assemblyname/s to find the actual path of the
assembly within GAC and type the full path in the addreference
window(select browse tab).

Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
What si the difference between Adding a Reference and actually dragging and dropping an activeX control onto a form? Thanks John ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
0
by: Saumendra | last post by:
Hi guys, When I am adding a Web Reference in Visual Studio.net, I provide the url to the .vsdisco file, so that Visual Studio.net can dynamically discover all the available Web Services. Now when...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
2
by: Chris Wertman | last post by:
I am rustier than I thought when it comes to Visual Studio and VB.NET for the last year I have been writing only ASP.NET pages in inline code and well I kinda forget how to add a reference , well...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
1
by: rgarf | last post by:
I have a web service that is consumed by a C++ application. I added a C# dll reference to the web service, When the web service calls a method on the dll, it sends back an HRESULT of E_FAIL to my...
3
by: _DS | last post by:
The two obvious methods for ref'ing assemblies are: Add a reference and 'Browse' for the actual DLL OR Add existing project to the solution, then add a ref to 'Project'. 1: I'd like to...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.