开发者

Error 80040154 (Class not registered exception) when initializing VCProjectEngineObject (Microsoft.VisualStudio.VCProjectEngine.dll)

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 t开发者_如何学Che 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜