惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
The Hacker News
The Hacker News
S
Securelist
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
H
Hacker News: Front Page
P
Privacy & Cybersecurity Law Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News | PayPal Newsroom
Project Zero
Project Zero
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
The Last Watchdog
The Last Watchdog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
S
Schneier on Security
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
月光博客
月光博客
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
F
Fortinet All Blogs
U
Unit 42
Help Net Security
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky

博客园 - 行万里路 责任 创新 执着

您最想知道的微软收购Skype的真正原因 多款令人震撼的JavaScript导航技术 精辟,我们一直在重复着失败 硬件加速会使电脑黑屏吗? 思想的沉淀,精辟,杨澜如是说 刚发现的2011年最给力的春联 如何使用USBWebserver在本机快速建立网站测试环境 关爱固执的人以及最常见的心理补偿 4个星期=一百万美金?网页创造的神话! 如何匹配嵌套Html标签(正则表达式) 天气预报经常查,使用Web Service实现 .Net下各种ORM框架介紹 据传百度已启动浏览器的研发 正在招聘人员 原来我是个伪白领 彻底卸载IIS的方法 积极心理学介绍 六字诀养生法 气功口诀 微软也为谷歌的Android系统制作应用程序 加入我的技术群我们一起交流
.net开发引用程序集提示没有强名称的解决办法 - 行万里路 责任 创新 执着
行万里路 责任 创新 执 · 2010-10-19 · via 博客园 - 行万里路 责任 创新 执着

为项目添加强名称方法

1.右键单击项目,打开属性窗口;

2.在属性窗口里选择《签名》标签,选中为程序集签名的选项,在下拉列表里选择新建;

3.打开新建签名窗口,输入签名的名称密码等内容;

单击确定后,签名添加完成。

为没有源码的DLL文件添加强名称:

如果项目中引用了其他没有源码的dll文件,并且此dll文件是没有强名称的程序集,则编译时会出现类似 "Assembly generation failed -- 引用的程序集 'xxxxxxxxxxx' 没有强名称" 这样的错误。

我这里引用的是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 on 2010-10-19 09:08  行万里路 责任 创新 执着  阅读(537)  评论()    收藏  举报