I'm working on a CLI tool that I would like to be fully self-contained so the user can simply run the binary directly. It is currently using .NET 5 as well as Microsoft.EntityFrameworkCore.Sqlite version 5.0.0.
Replicating the behaviour is very easy:
- Create a new project with
dotnet new - Add EF Core sqlite with:
dotnet add package Microsoft.EntityFrameworkCore.Sqlite - Publish the app self-contained with:
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true -c Release -o publish
Now you will see the output directory will have 3 files:
libe_sqlite3.so
<project_name>.pdb
<project_name>
The two containing <project_name> are fine, but the libe_sqlite3.so one, which the application cannot run without, makes it not fully self-contained.
Provider and version information:
- EF Core version: 5.0.0
- Database provider: Microsoft.EntityFrameworkCore.Sqlite
- Target framework: .NET 5.0
- Operating system: Ubuntu 20.04