-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
The MongoDB.Driver.Encryption NuGet package uses non-standard runtime identifier (RID) paths for native libraries, causing build/publish failures when customers using .NET6+ specify target platforms. This violates .NET packaging conventions and the .NET SDK cannot determine which variant matches the target RID. As such, all variants of a platform (e.g. linux) attempt to copy to the same output location resulting in NETSDK1152 error or wrong native library at runtime. Customers building/publishing for specific platforms on earlier versions of .NET don't get errors but the native library copied to the output directory where their app binaries are might not be the correct one.
Current Structure: MongoDB.Driver.Encryption/ └── runtimes/ ├── linux/ │ └── native/ │ ├── x64/ │ │ └── libmongocrypt.so │ ├── arm64/ │ │ └── libmongocrypt.so │ └── alpine/ │ └── libmongocrypt.so ├── win/ │ └── native/ │ └── mongocrypt.dll └── osx/ └── native/ └── libmongocrypt.dylib
Desired Structure: MongoDB.Driver.Encryption/ └── runtimes/ ├── linux-x64/ │ └── native/ │ └── libmongocrypt.so ├── linux-arm64/ │ └── native/ │ └── libmongocrypt.so ├── linux-musl-arm64/ │ └── native/ │ └── libmongocrypt.so ├── win-x64/ │ └── native/ │ └── mongocrypt.dll └── osx-x64/ └── native/ └── libmongocrypt.dylib