25 February 2011

Strong Name for existing DLL

If you need to add a strong name to an existing Dll start VisualStudio CommandLine and use this commands:
sn -k nameOfKeyfile.snk  <-- to generate a keyfile

ildasm nameOfTheDLL.dll /out:nameOfTheDLL.il <-- Get the MSIL for the DLL

ilasm nameOfTheDLL.il /dll /key=nameOfKeyfile.snk <-- Build a new DLL from the MSIL and the created KeyFile