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

Native libraries are not consumed in .net framework test projects

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Packaging
    • None

      If we consume our MongoDB.Driver nuget package in xunit (nunit) test projects with .net framework (like net472), the related native libraries are not copied into the test bin folder.

      But it works well if before this we would consume MongoDB.Driver.Core nuget explicitly. It also works well with console and winforms applications. So it looks like it's only test related.

      I also saw this behavior if I try to create a parent nuget for any 3rd party nuget with zstd I saw. As soon as I call pack for the newly created parent nuget (that has project reference let's say on https://github.com/bp74/Zstandard.Net) and then try to consume the parent nuget, the native libraries are not copied.

      I think it can be fixed via a new custom target, but it's a bit tricky. So we need to decide whether we want to proceed here.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: