-
Type: Task
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: 2.12.0
-
Component/s: Field Level Encryption
-
None
-
Environment:Linux
I am publishing my application as a single-file self-contained (minus runtime) executable like this:
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --no-self-contained
Note that the "--no-self-contained" only means the runtime is not bundled, but dependencies still are due to the "-p:PublishSingleFile=true" flag.
Ignoring pdb files, after I run the above command I can see the following contents under bin\Release\net5.0\linux-x64\publish:
MyExecutableProject libmongocrypt.so
The issue is that the mongocrypt dependency is not bundled within the MyExecutableProject executable. If I delete it manually I get the following error when executing MyExecutableProject:
Error: An assembly specified in the application dependencies manifest (MyExecutableProject.deps.json) was not found: package: 'MongoDB.LibMongocrypt', version: '1.2.0' path: 'runtimes/linux/native/libmongocrypt.so'
libmongocrypt.so was not present as a separate file on version 2.11, tested with 2.11.6.
- is related to
-
CSHARP-3844 Support single-file executables
- Backlog