Wednesday 7 September 2022

How to sign a .NET Assembly DLL file with a Strong Name

 How to sign a .NET Assembly DLL file with a Strong Name 

.NET Assembly DLL file can be sign with strong name if it is no sign by using ILDASM and ILASM

Create strong name file.

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools

sn -k sgKey.snk


(Dis)assemble a dll using the Visual Studio command prompt


ildasm directory\myLibrary.dll output:directory\MyLibrary.il

Assemble a dll using the Visual Studio command prompt

ilasm c:\myLibrary.il /dll /key=C:\MessageIntegrity.snk /output:C:\myLibrary.dll


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






No comments:

Post a Comment