I´m trying to run COM.Scanner project but the follow exception is thrown:
Retrieving the COM class factory for component with CLSID {9F8D4F16-0F61-4A38-98B3-1F6F80F11C87} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Like Interop.CoreScanner
is a .NET assembly I use regasm
to register the COM objects, but the error still occurs.
I come to read this good post but none of answers solved the problem.
This the information of Corflags:
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.6.81.0
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 0x1
ILONLY : 1
32BITREQ : 0
32BITPREF : 0
Signed : 0
The generated .reg
file with regasm
and /regfile
option is:
REGEDIT4
[HKEY_CLASSES_ROOT\CLSID\{9F8D4F16-0F61-4A38-98B3-1F6F80F11C87}\InprocServer32]
"Class"="CoreScanner.CCoreScannerClass"
"Assembly"="Interop.CoreScanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///D:/Github/miscelaneas/COM.Scanner/libs/Interop.CoreScanner.dll"
[HKEY_CLASSES_ROOT\CLSID\{9F8D4F16-0F61-4A38-98B3-1F6F80F11C87}\InprocServer32\1.0.0.0]
"Class"="CoreScanner.CCoreScannerClass"
"Assembly"="Interop.CoreScanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///D:/Github/miscelaneas/COM.Scanner/libs/Interop.CoreScanner.dll"
Environment:
- OS: Windows 10 (x64)
- Visual Studio 2015
QUESTION
- This smells like that there are missing entries on registry, but I don´t know which.
- If I´m in the right way why
regasm
is not able to generate the missing registry entries?