34

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.

1 Answer 1

66

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.

5
  • 10
    The x86 target platform was the issue. Thank you!
    – rkellerm
    Oct 26, 2010 at 9:15
  • 2
    Just ran into the 64 bit issue. Thanks a million!
    – jacknad
    May 25, 2011 at 12:58
  • @Hans Passant any more thoughts on this? I am building for x86 platform but still getting an error for a VB6 COM interop. My build machine is Widows server 2008 R2 Jul 19, 2012 at 20:20
  • 4
    You should totally bold that part about x86 - I bet 99% of the time that's what it is! Sep 17, 2012 at 8:09
  • 2
    @hans : So my application can never behave as a 64bit process ?
    – Novice
    Jan 28, 2014 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.