cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JoderCoder
Level 8

Global Assembly Cache

I have some files going to GAC. I need to set the path to the file in the registry. I attempted to do it like this FilePath = [#filekey], however this didnt work as it resolves to "C:\FileName".

Even when I tried to do this: FilePath = [GlobalAssemblyCache]FileName, but it again resolved to "C:\FileName". So I am thinking perhaps GAC is not a physical location to host the files but a reference means.

Any ideas? Thanks.
Labels (1)
0 Kudos
(1) Reply
Christopher_Pai
Level 16

Correct, it is not. There is a physical location but it's private to the Fusion API that manages the GAC. Drop to a dos prompt and CD to the Windows\Assembly directory and dir a dir /s foo.dll and you'll start to learn how the GAC's single instance storage works.

Now for the life of me I can't imagine why you would need a registry value that points to the location of the DLL. If a .NET assembly needs your DLL it simply references it per the assembly name, version, culture and public key token and .NET will serve it up for you. It's intentionally abstracted.
0 Kudos