Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3142

mongocrypt.dll not present when using mongocsharpdriver in an 'SDK' project

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.12.0
    • Affects Version/s: 2.10.4
    • Component/s: Packaging
    • None
    • Environment:
      Windows

      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.

        1. MongoCrypt.png
          28 kB
          David Razzetti
        2. MongoFiles.csproj
          6 kB
          David Razzetti
        3. packages.config
          0.9 kB
          David Razzetti

            Assignee:
            mikalai.mazurenka@mongodb.com Mikalai Mazurenka (Inactive)
            Reporter:
            david.razzetti563@btinternet.com David Razzetti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: