Home All Groups Group Topic Archive Search About

Accessing dlls from gac

Author
27 Jun 2005 11:44 PM
John
Hi

What are the advantages of storing ones class project dlls in gac? How can
one access these dlls?

Thanks

Regards

Author
28 Jun 2005 9:37 AM
Carlos J. Quintero [.NET MVP]
The GAC is a deployment feature to allow DLLs to be shared among the
applications (but allowing versioning). If your DLLs are not shared, IMO
it's better to keep them private in the application's folder. The run-time
has a probing system to find and load DLLs:

How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

Show quoteHide quote
"John" <John@nospam.infovis.co.uk> escribió en el mensaje
news:eHQjyI3eFHA.3712@TK2MSFTNGP12.phx.gbl...
> Hi
>
> What are the advantages of storing ones class project dlls in gac? How can
> one access these dlls?
>
> Thanks
>
> Regards
>
>
Author
28 Jun 2005 3:27 PM
John
Thanks for that. I do want to share my dll among several apps. So I have a
dll MyClass.dll in the 'C:\Windows\Assembly' folder. The sink file is
MyClass.snk. So how do I access functions in the MyClass.dll from my vb.net
apps?

Thanks

Regards


Show quoteHide quote
"Carlos J. Quintero [.NET MVP]" <carlosq@NOSPAMsogecable.com> wrote in
message news:OlQhaU8eFHA.2728@TK2MSFTNGP10.phx.gbl...
> The GAC is a deployment feature to allow DLLs to be shared among the
> applications (but allowing versioning). If your DLLs are not shared, IMO
> it's better to keep them private in the application's folder. The run-time
> has a probing system to find and load DLLs:
>
> How the Runtime Locates Assemblies
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp
>
> --
>
> Best regards,
>
> Carlos J. Quintero
>
> MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
> You can code, design and document much faster.
> Free resources for add-in developers:
> http://www.mztools.com
>
> "John" <John@nospam.infovis.co.uk> escribió en el mensaje
> news:eHQjyI3eFHA.3712@TK2MSFTNGP12.phx.gbl...
>> Hi
>>
>> What are the advantages of storing ones class project dlls in gac? How
>> can one access these dlls?
>>
>> Thanks
>>
>> Regards
>>
>>
>
>
Author
28 Jun 2005 3:56 PM
Carlos J. Quintero [.NET MVP]
The .snk file is not a "sink" file (AFAIK) but the acronym of Strong Name
Key, which is the file used to sign the assembly.

To access MyClass.dll from your VS.NET project, just add a reference to it
(References node of the Solution Explorer), Add Reference context menu,
browsing it in your file system. During development, the Dll should reside
in some folder outside the GAC (the GAC is only a deployment feature, not a
development feature). When referenced, the dll will be copied to the "bin"
output folder of your .NET app, to be located by the app at run time. At
deployment time, since it will be in the GAC, it does not need to be along
with the app executable.


--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com


Show quoteHide quote
"John" <John@nospam.infovis.co.uk> escribió en el mensaje
news:eeoyaX$eFHA.4040@TK2MSFTNGP14.phx.gbl...
> Thanks for that. I do want to share my dll among several apps. So I have a
> dll MyClass.dll in the 'C:\Windows\Assembly' folder. The sink file is
> MyClass.snk. So how do I access functions in the MyClass.dll from my
> vb.net apps?
>
> Thanks
>
> Regards
>