How to sign a .NET Assembly DLL file with a Strong Name? [duplicate]

If the original assembly is marked for delayed signing, then you can use the sn.exe tool.

If the original assembly is not so marked, then you can disassemble it with ildasm.exe, then re-asssemble it with ilasm.exe and specify the /key argument. References: [1] [2].

Example:

> ildasm /all /out=MYASSEMBLY.il MYASSEMBLY.dll
> ilasm /dll /key=key.snk MYASSEMBLY.il

Leave a Comment