| 1) Create an assembly key file Use the sn.exe tool to create a key file: sn -k StrongNameFile.snk If your path environment variables aren't set, you'll have to go to the C:\Program Files\Microsoft.NET\FrameworkSDK\Bin\ directory to run sn.exe) The filename "StrongNameFile.snk" can be any name you want. 2) Edit your assembly Now you have to add a tag which will link your assembly key to the assembly: using System.Reflection; [assembly:AssemblyKeyFile("StrongNameFile.snk")] Normally this is done in the utility AssemblyInfo.cs (vb) file. 3)Add your assembly to the GAC gacutil /i AssemblyFileName.dll To uninstall this assembly from the GAC, use the command: gacutil /u AssemblyFileName 4) (Opional) Add your assembly to machine.config Locate the <assemblies> tag (for web apps,under <configuration>/<system.web>/<compilation>/<compilers>/<assemblies>) Between the <assemblies> tags, enter: <add assembly="AssemblyFileName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5edf592a9c40680c" /> |
Be Different with excellent knowledge A Devloper Blog....
Showing posts with label Learn how to register an assembly in the GAC.. Show all posts
Showing posts with label Learn how to register an assembly in the GAC.. Show all posts
Wednesday, June 8, 2011
Learn how to register an assembly in the GAC.
Subscribe to:
Posts (Atom)
-
Make Your Own Notepad In this tutorial we will be making a simple C# Notepad with the option to Clear, Cut, Copy, Paste, Select All, Save...