COM:OLE 查看器无法创建类的实例

发布于 2024-08-04 13:24:01 字数 440 浏览 1 评论 0原文

使用 OLE/COM Viewer 我收到以下错误(当扩展我的注册类时)

CoGetClassObject failed.
<No system message defined> severity: SEVERITY_ERROR, facility:
<Unknown Facility> ($80131522)

COM 类是使用 RegAsm 注册的 C# 类。

这个错误是什么意思?

编辑:

参见 http://www.dotnet247.com/247reference/msgs/24 /124704.aspx 用于类似问题。

Using OLE/COM Viewer I get the following error (when expanding my registered class)

CoGetClassObject failed.
<No system message defined> severity: SEVERITY_ERROR, facility:
<Unknown Facility> ($80131522)

The COM Class is a C# class registered with RegAsm.

What does this error mean?

Edit:

See http://www.dotnet247.com/247reference/msgs/24/124704.aspx for similar issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

有深☉意 2024-08-11 13:24:01

COM 注册程序集的 bin 文件夹中是否缺少依赖程序集?或者应该位于 GAC 中但实际上并不在 GAC 中的依赖程序集?

您还可以使用 /codebase 开关解决问题,该开关将添加一个指向程序集位置的注册表项。

您还可以使用 fuslogvw< /a> 来查看当您的 .NET 程序集被 OLE Viewer 绑定到时发生了什么。

Is there a dependent assembly missing from the bin folder of the COM Registered assembly? Or a dependent assembly that supposed to be in the GAC that isn't actually in the GAC?

You may also be able to resolve you're issue using /codebase switch which will add a registry entry pointing to the location of your assembly.

You might also be able to find out more using fuslogvw to see what's happening when your .NET assemblies are being bound to by OLE Viewer.

焚却相思 2024-08-11 13:24:01

发现问题:

通过查看fuslogvw日志,我了解到OleViewer在与OleViewer.exe相同的文件夹中查找与它正在查找的程序集匹配的任何程序集(!)。偶然的机会,我运行 OleViewer 的文件夹中有一个旧版本的程序集。所以我要做的就是将 OleViewer.exe 复制到我的程序集注册的文件夹中。奇怪但真实!

Found the problem:

By looking at the fuslogvw logs I learned that OleViewer looks for any assembly in the same folder as OleViewer.exe that matches the assembly it is looking for (!). By chance I had an old version of my assembly in the folder I was running OleViewer from. So what I had to do was to copy OleViewer.exe to the folder where my assembly was registered. Strange but true!

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