We've got a 3rd party DLL that we use (not strong named) and I wanted to add it to the GAC. Alas! Only strong named assemblies are allowed in the GAC.
I've been trying figure this out for almost a week... couldn't find much help on Google , so I thought I'd share.
Well, here is my solution (it works... not sure if it's the best way though)
From a VS.NET command prompt, enter the following:
1. Generate a KeyFile
sn -k keyPair.snk
2. Obtain the MSIL for the provided assembly
ildasm providedAssembly.dll /out:providedAssembly.il
3. Rename/move the original assembly
ren providedAssembly.dll providedAssembly.dll.orig
4. Create a new assembly from the MSIL output and your assembly KeyFile
ilasm providedAssembly.il /dll /key= keyPair.snk
Viola!
You now have a strong named assembly.
You cannot make anything fool-proof... Fools are too inventive http://dotnet.org.za/doubleJ
DoubleJ:Well, here is my solution (it works... not sure if it's the best way though)
I did some research on this last month. It is pretty much the only way to do it.
Going Backward Slowly