时间:2019-03-17 标签:c#ContextMenuHandler

发布于 2024-12-15 04:39:14 字数 733 浏览 1 评论 0原文

我尝试使用此代码为我的应用程序开发自己的上下文菜单处理程序: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疏忽 2024-12-22 04:39:15

有些人报告说,当您将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文