[CSHARP-3806] Native libraries are not consumed in .net framework test projects Created: 19/Aug/21  Updated: 31/Mar/22

Status: Backlog
Project: C# Driver
Component/s: Packaging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from CSHARP-2933 Packaging tests Closed

 Description   

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.

 


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