LogViewPlus Support

Plugin CustomReader: Dependencies to other libraries

https://www.logviewplus.com/forum/Topic2011.aspx

By phw - 16 Jan 2024

Hi There

I am implementing a CustomReader, based on your Template.
I want to connect directly to MongoDB, where my logs are stored as JSON.
Everything is working fine, until i try to use an additional package like   MongoDB.Driver.dll  .
Can you plz explain where i have to store the external libraries, so i can use them in the Plugin?


BTW:
By design, its not possible to build the external libraries into the plugin.dll, which would be the obvious solution.

Thanks for the answer
phw


My version: 
Logviewplus V3.0.8
Visual Studio 2022




By LogViewPlus Support - 16 Jan 2024

Hi Phw,

The DLL will need to be placed in the %AppData%\LogViewPlus\Plugins directory next to your DLL.  Note that any DLLs referenced by MongoDB.Driver.dll will also need to be found in the same directory (or the GAC).  Often the error message shown here by .Net is something like "could not load dll or one of its dependencies".

I would also recommend upgrading to LVP 3.1 if possible.  The latest release uses a newer .Net Framework version (4.8) and there may also be minor changes to the common library.  It is also possible that the updated framework version will require an updated Mongo DB driver (just something to keep in mind).

Hope that helps,

Toby
By phw - 16 Jan 2024

thank you Toby, that helped, I understand the problem now
regards
phw
By LogViewPlus Support - 16 Jan 2024

Glad to hear it - thanks for letting me know!  Smile