解决第三方DLL没有强签名

时间:2023-06-01 18:28:20

-----转载:http://blog.csdn.net/zyming0815/article/details/5939090

创建一个新的随机密钥对:sn -k myTest.snk

第一步: 将DLL文件解开 ildasm myTest.dll /out:myTest.il 
第二步: 将签名合入DLL ilasm myTest.il /res:myTest.res /dll /key:myTest.snk /out:myTestSN.dll 
第三步: 检查 sn -vf myTestSN.dll

例如:

C:/Program Files/Microsoft Visual Studio 8/SDK/v2.0>ildasm C:/Salien.Utility.V2005.dll /out:C:/Salien.Utility.V2005.il
C:/Program Files/Microsoft Visual Studio 8/SDK/v2.0>ildasm C:/Salien.Utility.V2005.dll /out:C:/Salien.Utility.V2005.il
C:/Program Files/Microsoft Visual Studio 8/SDK/v2.0>ilasm C:/Salien.Utility.V2005.il /res:C:/Salien.Utility.V2005.res /dll /key:C:/Salien.Utility.V2005.snk /out:C:/Salien.Utility.V2005.dll