GAC is used particularly when a dll or assembly is needed by many programs and that requires some Administrative security rights to work.In this case that dll is placed under "C:/windows/Assamblies/GAC" depending on the type of GAC folder When I dir my "C:/windows/assembley" folder I get following GAC's
- GAC
- GAC_32
- GAC_MSIL
This problem is solved using sn or Strong Naming where a hash value of dll is taken and is decoded using a private key and a public key is added to the resultant information or to its name.
Thus multiple versions of same dll can be used with different public keys.
This can be seen here in the below figure
Here if you see in the end there is a dir in the end with name 2.0.0.0__b77a5c561934e089 the first part here implies the version and second part implies the public key.
We can also create Strong Names of our own dll's a tool called gc.exe comes with Visual studio for that purpose I will cover the use of that tool in my next post.
No comments:
Post a Comment