MongoDB.Libmongocrypt dependency not found

I am running a C# Lambda function locally using AWS Lambda Tools on .NET Core 3.1 and repeatedly run into this issue when updating to a newer MongoDB Driver version (currently stuck on 2.11.6).

I have tried installing the peer dependency as well, and it does not work. We are not doing any client-side encryption either, so this library is pretty useless for us but blocks us from newer versions of the driver. I have looked over StackOverflow and this forum and have found very little about how to fix this.

Hello @Tyler_Zieske ,
can you please confirm that you see this issue when you try to consume driver nugets with versions higher than 2.11.6 on mac OS? Also, do you have this error during a build step or it’s runtime one?
I’m not familiar with AWS Lambda, but I assume it works in regular way, if so can you please check the content of .nuget/packages/mongodb.driver.core/2.13.1/runtimes ?

1 Like

This was actually an issue with the AWS Lambda Test Tool v3.1. I needed to add the following to my .csproj files, which changes the DLL behavior which is why this dependency was “missing”.

<PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.