I want to include all the needed dll´s inside 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 cant get it work...
I created a "libs" folder inside my project and I copy all the dll´s. Then I add one of this dll (the other 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
all works well...
EDIT:
As I said the sdk of zkteco (a biometric scanner) has multiple dll. But I only can add one as reference. the others throws me the next 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
.
So I don't know what is the problem here...
The dll's:
My reference:
Properties of each of this libs:
My folder with all dll's:
Properties of each of this libs:
After seeing the update to the question and chatting more with OP regarding his specific case, I've come to realise that my answer may not be very useful as it currently stands. I'll leave it here for now in case I think of anything more. :)
Using dlls of sdk inside my app without copy and register
Yes you can use Isolated COM. Essentially it means Your app can be deployed along with the COM dlls but your manifest file makes it so you don't need to have the COM dlls registered.
Simply click the Isolated property on the COM reference and this updates/creates the manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With