I need to create a COM wrapper for a NET API dll, to use it in MS Access. The NET API DLL I need to create COM wrapper for uses Newtonsoft.Json.dll
So I have he following DLL's
- my.dll (COM-enabled DLL exposing few methods to be used in COM Client - MS Access)
- api.dll - native NET DLL exposing an api I need to access in MS Access
- newtonsoft.json.dll - used by api.dll
When I call from my COM client (MS Access) a method in my.dll (which calls a method in api.dll) I get the error
Could not load file or assembly Newtonsoft.Json.dll (blah blah) or one of its dependences. The system cannot find the file specified
I tried to copy Newtonsoft.dll and api.dll in system.32, in the same folder with my Access MDB, in MS Access folder. Nothing worked.
I tried to add Newtonsoft to GAC using
gacutil /i newtonsoft.json.dll
which apparently worked, response was
Assembly successfully added to the cache
but when I tried to check if it is there with
gacutil /l newtonsoft.json.dll
I got message: Number of items = 0, so apparently it wasn't added to GAC
Anyway, any suggestion to make this work?
Thanks