初始化VCProjectEngineObject(Microsoft.VisualStudio.VCProjectEngine.dll)时发生错误80040154(类未注册异常) [英] Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll)

查看:535
本文介绍了初始化VCProjectEngineObject(Microsoft.VisualStudio.VCProjectEngine.dll)时发生错误80040154(类未注册异常)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行工具,以转换一个Visual C ++项目makefile。
我试图转换项目的项目是用VS2008编写的,所以我使用的版本9引用了Microsoft.VisualStudio.VCProjectEngine.dll。



在此行中失败:

  VCProjectEngine vcprojEngine = new VCProjectEngineObject(); 

出现以下异常:


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


尝试注册VCProjectEngine .db与p>提前感谢

解决方案

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



一个标准的失败模式是运行在64位操作系统。这是32位非托管代码,你确实会得到'类未注册'的异常。 Project + Properties,Build选项卡,将Platform Target更改为x86。


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.

解决方案

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.

这篇关于初始化VCProjectEngineObject(Microsoft.VisualStudio.VCProjectEngine.dll)时发生错误80040154(类未注册异常)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆