Steps for Giving strong name to DLL
- Open .net command prompt.
- Go to the folder contanig DLL.
- Type sn -k test.snk, you can use any file name instead of test. This will create test .snk file in that folder.
- Open the assemblyinfo.cs file of project.
- Type file path in this tag [assembly:AssemblyKeyFile@"E:\hemant\practice\HP\bin\Debug\HP.snk")]
- Build application, finally your strong name created for your DLL.
Example
- Created class library path E:\hemant\practice\HP
- Open command prompt go to Dll folder path.
This create HP.snk file in E:\hemant\practice\HP\bin\Debug folder.
- Open the AssemblyInfo.cs file of project.
Type path of snk file in following attribue.
Steps for Installing in GAC
- After giving strong name in .net command prompt type gacutil in DLL path
this will install file in assembly.
Copy the DLL file C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 folder.
- You can add references to another project using .net tab.