When using mongocsharpdriver 2.10.4 in an 'SDK' project targetting .NET Framework 4.7.2, the mongocrypt.dll file is not present in the output folder upon build completion.
To Reproduce:
Create a C# library project using the SDK project-file format. Add mongocsharpdriver Nuget at version 2.10.4 as a dependency. Build the library. Examine the output folder. Note that mongocrypt.dll is absent. Here's an example project file:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net472</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="mongocsharpdriver" Version="2.10.4" /> </ItemGroup> </Project>
Now repeat the exercise using traditional project and packages.config files (examples attached). Note that mongocrypt.dll is present.
The MongoCrypt.png screen-shot shows an output folder comparison between the two projects.