I’m writing a CloudCode module that reads data from a remote PostgreSQL database.
I added Npgsql to my module via Nuget which I use to connect to my database. Npgsql has a dependency on Microsoft.Extensions.Logging.Abstractions, which is an “Implicitly Installed Package”
When I call my CloudCodeFunction, I get this error:
Invocation Error
ScriptRunner.Exceptions.CloudCodeRuntimeException: Error executing Cloud Code function. Exception type: FileNotFoundException. Message: Could not load file or assembly ‘Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60’. The system cannot find the file specified.
at Npgsql.NpgsqlConnection.SetupDataSource()
at CloudCode.Module.CloudCodeFunction() in D:\Project\Module.cs:line 24
I tried explicitly adding the Microsoft.Extensions.Logging.Abstractions to my project via Nuget and verified that the DLL is included in my package, but the problem persists.
Is there something I need to do in order to handle implicitly installed packages?