Strong Naming an existing assembly
Now this is one problem that we face when we use a 3rd party DLL, which is not-strongly named & we still want to dump it to GAC.
So, lets see the 5-step solution:
- Go to Visual Studio Command Prompt
- Generate a Strong Name Key File
sn -k keyPair.snk - Obtain MSIL for the assembly
ildasm Assembly.dll /out:Assembly.il
- Rename the original assembly
ren Assembly.dll Assembly.dll.old
- Create a new assembly from MSIL & Key File
ilasm Assembly.il /dll /key= keyPair.snk