DLL强名称解决办法

看了博客若干 一个傻办法

把dll文件改成Interop.Scripting.dll,拷贝到C:\Program Files\Microsoft Visual Studio 9.0\VC

然后用网上这个通俗的教程,一步步来吧 直接copy,paste就好了

我这里引用的是Interop.Scripting.dll程序集,它不是强名称的,则需要进行以下操作:
1.打开SDK 命令提示窗口;

2.创建一个新的随机密钥对:

sn -k Interop.Scripting.snk
3.反编译目标程序集
ildasm Interop.Scripting.dll /out=Interop.Scripting.il
3.重新编译,附带强命名参数
ilasm Interop.Scripting.il /dll /resource=Interop.Scripting.res /key=Interop.Scripting.snk /optimize
4.验证签名信息
sn -v Interop.Scripting.dll

OK,将生成的dll文件重新引入到项目中然后编译。



posted @ 2012-04-01 10:18  灰灰锅  阅读(682)  评论(0编辑  收藏  举报