如何使汇编强命名? [英] How to make assembley strong named?

查看:94
本文介绍了如何使汇编强命名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用Managed C ++制作的小dll,不是我的.我无法编译我的解决方案,因为它说汇编必须是强名称.我无法重新编译它,因此它是已编译dll强名称的解决方案.提前谢谢.

[编辑-从OP的答案移开-亨利]
(不知道我应该在这里发布.从移动工作)库是混合模式的,所以ilasm不起作用.我的外壳扩展需要它,因此需要在GAC中注册.是否有可能创建某种包装程序来调用GAC的dll.无论哪种方式,谢谢大家,很好的社区没想到这么快就回答了.
[/Edit]

I have a small dll made in Managed C++, not mine. I can''t compile my solution because it says that that assembley must be strong name. I can''t recompile it so is the a solution to strong name already compiled dll. Thanks in advance.

[Edit - Moved from answer by OP - Henry]
(Don''t know should I post here. Working from mobile ) The libary is mixed mode , so ilasm doesn''t work. I need it for my shell extension so it needs to be registrated in GAC. Is there a posability to create some kind of wraper to call a dll outiside of GAC. Either way thanks all , nice comunity didn''t expect answer so fast.
[/Edit]

推荐答案

[^ ]应该会为您提供帮助.
This [^]should help you.


您仍在使用托管C ++吗?现在已过时,已替换为C ++/CLI.

出于多种原因,您真的想对所有程序集使用强名称.
问题在于,一旦引用了强命名程序集,它就会提取所有其他程序集以获得强名称.

如果您无权访问源代码,则仍可以对其进行签名.
使用snildasmilasm并使用该密钥进行密钥.
Do you still use Managed C++? It is obsolete now, replaced with C++/CLI.

You really want to use strong names for all assemblies, by many reasons.
The problem is that once you referenced strong-named assembly, it pulls all other assemblies to get a strong name.

If you don''t have access to source code, it still can be signed.
Make a key using sn, ildasm and ilasm with the key.
sn -k 2048 key.snk
ildasm myAssembly.dll /out:MyAssembly
ilasm myAssembly /key:key.snk /dll /output:myNewAssembly.dll



它可能不适用于混合模式库(托管+非托管).

—SA



It may not work with mixed-mode library (managed+unmanaged).

—SA


我认为此dll在&突然,它停止在您的项目中工作.我建议您清理项目,删除bin和所有对DLL的引用,然后再次添加它们.重建应用程序并运行.它可能会解决.如果此方法不起作用,则可以尝试使用强名称签名工具,如sn.exe
I suppose this dll was working before & suddenly it stopped working in your project.I would suggest,you clean the projects, remove bin and all references to DLLs and add them again.Rebuild your application and run.It may resolve.If this doesnt work,you can try using strong name signing tools like sn.exe


这篇关于如何使汇编强命名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆