Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Accessing a dll in the GAC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cashdeskmac - 13 Jul 2006 13:24 GMT
Having created my dll, I have installed it into the GAC. All fine, no problems.

The trouble starts when I try to access this dll.

How do I tell my program to look in the GAC for the dll?  Does it do this
automatically?  Do I have to specify it in the app.config file?

Also, if I want to reference the dll in future, is there a way to get it to
appear in the .NET tab of the Add Reference dialog in Visual Studio 2003?

Sorry, but I'm new to this GAC stuff.
Norman Yuan - 13 Jul 2006 15:40 GMT
Yes, .NET app will look GAC for the referenced dll first, if not, then look
into the same folder, then subfolder, or folder specified in app.config...

Place dll into GAC, does not make it appear in VS's "References" dialog box,
you need to modify a Windows Registry for this. Search the NET or MS KB
would lead you to how to do this. Actually, it is recommended you keep a
copy of the dll (exact version of the dll you placed into GAC) somewhere in
your local drive and set reference to it in your developing project. As
mentioned above, although your developing app has reference to the dll file
somewhere in your drive, the app always try to load it from GAC first.

> Having created my dll, I have installed it into the GAC. All fine, no
> problems.
[quoted text clipped - 9 lines]
>
> Sorry, but I'm new to this GAC stuff.
Vitaly - 15 Jul 2006 22:50 GMT
But what to do if I want to load .NET module from C/C++ code? I do now this
from SUN Java code. How do I find my DLL location in GAC? See my module
Setup for MS Visual Studio 7.1 .NET with examples at
http://www.simtel.net/product.php[id]95126[sekid]0[SiteID]simtel.net

Vitaly

> Yes, .NET app will look GAC for the referenced dll first, if not, then
> look into the same folder, then subfolder, or folder specified in
[quoted text clipped - 22 lines]
>>
>> Sorry, but I'm new to this GAC stuff.
Phil Wilson - 16 Jul 2006 19:20 GMT
"load ..from C/C++" needs a bit more definition. In managed C++ you'd
probably have a reference to the .NET assembly at build time and at runtime
it would be loaded from the GAC, as in the previous answer. If you mean you
want to load it manually into a C++ app, you'd use the CLR hosting types of
APIs or Assembly.Load from managed code.
Signature

Phil Wilson
[Microsoft MVP-Windows Installer]

> But what to do if I want to load .NET module from C/C++ code? I do now
> this from SUN Java code. How do I find my DLL location in GAC? See my
[quoted text clipped - 31 lines]
>>>
>>> Sorry, but I'm new to this GAC stuff.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.