'DLL not found, Newtonsoft.Json [duplicate]

So I've built a Com Interfaced DLL. I've fully tested it using Nunit. I had an issue with Newtonsoft.Json not found and resolved by including it in the Class library project. Now As I said the project is a COM interfaced DLL. When I call the DLL from my VBA development system I get the error, I've not yet tested outside the IDE for this VBA development system, makes no sense to do so.

So what is this DLL for? It is an interface to vendor WEBAPIs. It also serves as a TCP database access tool. So included, via NUGET package, in the DLL is WatsonTCP which relies on Newtonsoft.Json. That is the point where the failure occurs. It is using .Netframework 4.7.2.

I have copied the newtonsoft.Json.DLL to the VBA project folder, the VBA IDE exe folder, System folder, syswow64. none seem to resolve the issue. The dll is executing from the bin folder under the Class project as expected.

Any further suggestions? I've been digging on the web and so far the above attempts are what is suggested on the net. Or perhaps I've not entered the correct search words 8).



Solution 1:[1]

You have to install the Nuget package Newtonsoft.Json, therefore when you build the project you will be able to use it. Just remember to copy the JSON DLL to wherever the executable that uses you other DLL is.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Raskayu