I want to include all the necessary DLLs in my C # project, so you do not need to copy them to system32 and register them.
I tried with costura.fody and other ways, but I can't get it to work ...
I created the “libs” folder inside my project and I copy all the DLLs. Then I add one of these dlls (the others are dependencies, as I know) as a reference.
But I get this error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in myapp.exe Additional information: Could not retrieve COM class generator for component {00853A19-BD51-419B-9269-2DABE57EB61F} Due to the following error: 80040154 Unregistered class (Exception of HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
When I copy all the DLLs to my system32 folder and register one of them with
regsvr32 %windir%\system32\zkemkeeper.dll
everything works well...
EDIT:
As I said, sdk zkteco (biometric scanner) has several dlls. But I can add only a link. others throw me the following error:
A reference to XXX.dll could not be added. Please make sure that the file is accesible, and that it is a valid assembly or COM component A reference to XXX.dll could not be added. Please make sure that the file is accesible, and that it is a valid assembly or COM component .
So I don’t know what the problem is here ...
DLL:

My recommendation:

Properties of each of these libraries:

My folder with all dlls:

Properties of each of these libraries:

source share