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 / Distributed Applications / August 2003

Tip: Looking for answers? Try searching our database.

Referencing a DLL in the GAC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Perry - 19 Aug 2003 19:04 GMT
I am attempting to use the Exception Application Block to
publish error's to the Event Log. On my development
machine this works fine. However, I want to deploy to a
test server and use the GAC on the server to hold the dll
so that other applications can use the dll.

I can add a reference before I deploy but this does not
point to the GAC on the server.  How do I reference the
dll in the GAC from my application?

Thanks
Perry
Ice - 19 Aug 2003 19:11 GMT
Install dll in GAC and add registry key to include directory where dll is
located
HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders

ice
> I am attempting to use the Exception Application Block to
> publish error's to the Event Log. On my development
[quoted text clipped - 8 lines]
> Thanks
> Perry
Perry - 19 Aug 2003 19:52 GMT
Thanks Ice, but I am an inexperienced Registry user.
Should I have a AssemblyFolders directory in my Registry
because I don't see it? And what do I call the key?

Thanks
Perry
Ice - 19 Aug 2003 20:15 GMT
call it whatever you want too (the key that is)..
and specify a new string value for the directory where the assemblies are
located.

you should have AssemblyFolders, but if you don't create it and then create
a subfolder.

ice
> Thanks Ice, but I am an inexperienced Registry user.
> Should I have a AssemblyFolders directory in my Registry
> because I don't see it? And what do I call the key?
>
> Thanks
> Perry
Ice - 21 Aug 2003 17:43 GMT
Maybe I miss understood the original post.

You can never directly reference a dll from the GAC, it will always point to
directory from which the dll was installed into the GAC.

I thought you wanted the dlls in the GAC to show up under the .NET tab of
"Add References" feature.

ice
> Thanks Ice, but I am an inexperienced Registry user.
> Should I have a AssemblyFolders directory in my Registry
> because I don't see it? And what do I call the key?
>
> Thanks
> Perry
Manoj G [MVP] - 21 Aug 2003 04:31 GMT
I suppose this is not necessary. If an assembly is strong named and
referenced, the assembly resolver would automatically look for the assembly
in the GAC. So, you just need to deploy the referenced assembly in the GAC
and nothing else.
--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet

> Install dll in GAC and add registry key to include directory where dll is
> located
[quoted text clipped - 13 lines]
> > Thanks
> > Perry

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.