初始化 VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll) 时出现错误 80040154(类未注册异常)

发布于 2024-09-29 06:09:05 字数 633 浏览 0 评论 0原文

我正在尝试运行 工具以转换 Visual C++项目到 makefile。 我尝试转换的项目是用 VS2008 编写的,因此我使用版本 9 中对 Microsoft.VisualStudio.VCProjectEngine.dll 的引用。

它在这一行中失败:

VCProjectEngine vcprojEngine = new VCProjectEngineObject();

但有以下例外:

检索 COM 类工厂 具有 CLSID 的组件 {D19A00C4-A7F9-4E14-A5E1-D060B7EB57F3} 由于以下错误而失败: 80040154 类未注册 (HRESULT 异常:0x80040154 (REGDB_E_CLASSNOTREG))。

当尝试使用 regsvr32 注册 VCProjectEngine.dll 时,出现错误,指出未找到入口点 DllRegisterServer。

有什么想法吗?

提前致谢。

I'm trying to run this tool in order to convert a Visual C++ project to makefile.
The project I'm trying to convert project is written in VS2008, so I'm using a reference to Microsoft.VisualStudio.VCProjectEngine.dll from version 9.

It fails in this line:

VCProjectEngine vcprojEngine = new VCProjectEngineObject();

With the following exception:

Retrieving the COM class factory for
component with CLSID
{D19A00C4-A7F9-4E14-A5E1-D060B7EB57F3}
failed due to the following error:
80040154 Class not registered
(Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).

When tried to register VCProjectEngine.dll with regsvr32, I got an error that the entry point DllRegisterServer was not found.

Any idea??

Thanks in advance.

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

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

发布评论

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

评论(1

毁我热情 2024-10-06 06:09:05

没有太多好的理由会失败,尤其是 regsvr32 步骤。在该 dll 上运行 dumpbin /exports。如果您没有看到 DllRegisterServer,那么您的安装已损坏。它应该有更多的副作用,你将无法再构建 C/C++ 项目。

一种标准故障模式是在 64 位操作系统上运行。这是 32 位非托管代码,您确实会收到“类未注册”异常。项目 + 属性,构建选项卡,将平台目标更改为 x86。

There are not many good reasons this would fail, especially the regsvr32 step. Run dumpbin /exports on that dll. If you don't see DllRegisterServer then you've got a corrupt install. It should have more side-effects, you wouldn't be able to build C/C++ projects anymore.

One standard failure mode is running this on a 64-bit operating system. This is 32-bit unmanaged code, you would indeed get the 'class not registered' exception. Project + Properties, Build tab, change Platform Target to x86.

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