时间:2019-03-17 标签:c#ContextMenuHandler
我尝试使用此代码为我的应用程序开发自己的上下文菜单处理程序: http: //www.codeproject.com/KB/shell/ ratingcolumn.aspx
但是什么也没发生。然后我尝试编译该代码,构建 dll 并使用它
regasm pathToDLL /codebase
来注册它,这就是我得到的答复
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can ca
use your assembly to interfere with other applications that may be installed on
the same computer. The /codebase switch is intended to be used only with signed
assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
但是新的文件评级菜单没有出现(尝试重新启动窗口,刷新关联,菜单,一切)。我错过了什么吗?我是否按照应有的方式注册了 DLL?
I've tried to use this code to develop my own context menu handler for my app: http://www.codeproject.com/KB/shell/ratingcolumn.aspx
However nothing happened. Then I tried just compiling that code, building dll and using
regasm pathToDLL /codebase
to register it, this is what I got as a reply
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can ca
use your assembly to interfere with other applications that may be installed on
the same computer. The /codebase switch is intended to be used only with signed
assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
However the new File rating menu did not appear(tried rebooting windows, refreshing associations, menus, everything). Am I missing something? Do I register the DLL as I should?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有些人报告说,当您将 RegAsm 与未签名的程序集一起使用时,您会得到漏报(类型已成功注册,但该类型实际上并未成功注册)。
参见这篇文章:
我
认为您的第一步应该是签署您的程序集并 100% 确定您已注册它。
然后,您应该仔细检查将哪些类型公开为 COM 对象。
希望这有帮助。
Some people reported that when you use RegAsm with unsigned assemblies, you get false negatives (type registered sucessfully, but the type wasn't actually registered successfully).
See this post:
Regasm and Com Interop false negatives
I think the first step for you should be to sign your assembly and make 100% sure you registered it.
Then you should carefully check what types do you expose as COM objects.
Hope this helps.