[CSHARP-2874] Improve Snappy dll loading and/or packaging Created: 12/Dec/19  Updated: 28/Oct/23  Resolved: 11/Aug/22

Status: Closed
Project: C# Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.18.0

Type: Improvement Priority: Major - P3
Reporter: Vincent Kam (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2019-12-12-11-25-48-325.png    
Issue Links:
Related
related to CSHARP-3612 Installing the driver using NuGet pul... Closed
is related to MONGOCRYPT-471 Improve libmongocrypt packaging for .... Backlog
is related to CSHARP-4271 Replace Snappy and Zstd with managed ... Closed
Backwards Compatibility: Minor Change

 Description   

Currently, the way Snappy is packaged results in multiple copies of the snappy64.dll being included in the nuget package (see image).

Using more modern packaging strategies (i.e. leveraging content/contentFiles or runtime) should reduce redundant copies by at least one.

Research will likely be needed because the official documentation is currently somewhat unsatisfactory (see https://github.com/NuGet/Home/issues/6645 and https://github.com/NuGet/Home/issues/8623). A preliminary scan of the literature suggests that we may even be able to simply use DllImport instead of using our current LibraryLoader approach, which would simplify the codebase.



 Comments   
Comment by James Kovacs [ 11/Aug/22 ]

This issue has been resolved by switching to managed compression libraries (CSHARP-4271). The same problem may be present in MongoDB.Libmongocrypt. Follow MONGOCRYPT-471 for updates.

Comment by Vincent Kam (Inactive) [ 12/Dec/19 ]

We could also apply the improvements to our C# FLE binding, from which much of our current native library loading techniques are derived from

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