[CSHARP-3142] mongocrypt.dll not present when using mongocsharpdriver in an 'SDK' project Created: 24/Jun/20  Updated: 28/Oct/23  Resolved: 30/Oct/20

Status: Closed
Project: C# Driver
Component/s: Packaging
Affects Version/s: 2.10.4
Fix Version/s: 2.12.0

Type: Bug Priority: Major - P3
Reporter: David Razzetti Assignee: Mikalai Mazurenka (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Attachments: PNG File MongoCrypt.png     File MongoFiles.csproj     File packages.config    
Case:

 Description   

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.



 Comments   
Comment by Githook User [ 02/Nov/20 ]

Author:

{'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}

Message: CSHARP-3142: Fix csharp binding targets file
Branch: master
https://github.com/mongodb/libmongocrypt/commit/200e383955c7a3db9a82e58c6f3f88513cb6a76e

Comment by Githook User [ 29/Oct/20 ]

Author:

{'name': 'MikalaiMazurenka', 'email': '55145764+MikalaiMazurenka@users.noreply.github.com', 'username': 'MikalaiMazurenka'}

Message: CSHARP-3142: mongocrypt.dll not present when using mongocsharpdriver in an 'SDK' project (#110)
Branch: master
https://github.com/mongodb/libmongocrypt/commit/cb172b22bbe2d3aeb923d4eba7633c0b6fb570ea

Generated at Wed Feb 07 21:44:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.