初始化 VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll) 时出现错误 80040154(类未注册异常)
我正在尝试运行 此 工具以转换 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有太多好的理由会失败,尤其是 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.