Hi
can any one tell me how can i use assembly added in GAC.............?
Hi
can any one tell me how can i use assembly added in GAC.............?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 18, 2012, 11:01 PM
before install your assembly in GAC, your assembly must have storng name.
Turn off verification for the assembly if you're storing the assembly in the GAC. By default, the GAC verifies the strong name of each assembly. If the assembly is not signed by using the private key, this verification fails. So, for development and testing purposes, you can relax this verification for an assembly by issuing the following command:
sn.exe -Vr MyFile.dll
When you're ready to deploy a delay-signed assembly, you need to sign it with your private key:
sn.exe -R MyFile.dll MyKeyFile.snk
Finally, you can instruct the GAC to resume verification for an assembly by issuing the following command:
sn.exe -Vu MyFile.dll
In order to share a .NET assembly with multiple applications installed on the same machine, it needs to be installed as Shared Assembly in the Global Assembly Cache (GAC).
gacutil /i MyFile.dll
hope this help.
Satyapriya NayakPosted Jan 18, 2012, 10:28 PM
Please refer the below links
http://www.codeproject.com/KB/cs/usedllgac.aspx
http://www.codeproject.com/KB/dotnet/demystifygac.aspx
Thanks