VS2017: Class not registered error in debug mode, compiled .exe working

0

I have some old external 32bit libraries from around 2005 or 2006 called eDocEngineX/PDFToolkitX. Both are installing and registering seemingly fine via an MSI package (or even manually via regsrv32 in System32 and/or SysWOW64: the registry entries seem to be correctly placed by Windows). I have no problems when starting some piece of software using them from Windows 10.

My problem is that I can't debug my WinForms solution using these anymore. Whenever an object from one of these libraries is instantiated it throws the following exception:

System.Runtime.InteropServices.COMException: "Retrieving the COM class factory for component with CLSID {EDE601A4-FFD6-4B99-BDB6-CB6C60B03BFD} failed due to the following error:: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

When I start the compiled .exe file outside of VS everything works as intended, no exceptions, errors or anything. Every functionality of these libraries runs smoothly.

So my problem seems to only exist when using the debugger. Main hint you'll find online is to set the Debug configuration to x86 to force 64bit-VS to use 32bit-DLLs. I did this for every single project in this solution and checked the build properties too, but still get the error when one of these classes is instantiated.

Reregistering and readding of the components to the references didn't work either, so I assume that there is some other setting in VS that I'm missing.

Using the Release mode (setting everything to x86 again) results in my software not even starting (though VS diagnostic tools show background activity).

So please tell me: why are these libraries not working in Debug mode but in Windows?

Thanks for your help!

c#
winforms
visual-studio-2017
com
asked on Stack Overflow Mar 22, 2019 by Svartkabel

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0