StaticLink.e_sqlite3
2.1.10.1
dotnet add package StaticLink.e_sqlite3 --version 2.1.10.1
NuGet\Install-Package StaticLink.e_sqlite3 -Version 2.1.10.1
<PackageReference Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
<PackageVersion Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
<PackageReference Include="StaticLink.e_sqlite3" />
paket add StaticLink.e_sqlite3 --version 2.1.10.1
#r "nuget: StaticLink.e_sqlite3, 2.1.10.1"
#:package StaticLink.e_sqlite3@2.1.10.1
#addin nuget:?package=StaticLink.e_sqlite3&version=2.1.10.1
#tool nuget:?package=StaticLink.e_sqlite3&version=2.1.10.1
StaticLink.e_sqlite3
中文
StaticLink.e_sqlite3 是一个面向 .NET NativeAOT 发布的 SQLite 静态链接辅助包。
它按照 StaticLink.Avalonia 的方式工作: 项目只要引用这个 NuGet 包,在
PublishAot=true 并指定 RuntimeIdentifier 发布时,包内的
buildTransitive MSBuild 目标会自动选择当前平台对应的 e_sqlite3 静态库,
加入 NativeAOT 链接流程,并清理发布目录中被依赖包带出的动态
e_sqlite3 文件。
这个包只负责提供和链接原生 SQLite 静态库,不替代 SQLite 的托管访问层。
实际数据库访问仍然使用 Microsoft.Data.Sqlite, SQLitePCLRaw.bundle_e_sqlite3
或其他基于 SQLitePCLRaw 的包。
特性
- 引入 NuGet 包即可生效,不需要手动配置
NativeLibrary。 - AOT 发布时根据
RuntimeIdentifier自动选择静态库。 - 支持 Windows, Linux, Linux musl 和 macOS。
- 适合希望 NativeAOT 单文件或少文件发布,并减少外部
e_sqlite3动态库依赖的项目。
支持的 RID
win-x64win-x86win-arm64linux-x64linux-arm64linux-musl-x64linux-musl-arm64osx-x64osx-arm64
安装
dotnet add package StaticLink.e_sqlite3
通常还需要引用 SQLitePCLRaw 的 bundle,或引用会间接带入它的包:
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.10" />
<PackageReference Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
使用 Microsoft.Data.Sqlite 时也可以直接搭配本包:
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageReference Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
发布示例
dotnet publish -c Release -r linux-x64 -p:PublishAot=true -p:SelfContained=true
发布时会自动链接 static/<rid>/native 下对应的静态库。若目标 RID 不在支持列表内,
本包不会注入静态库。
来源和许可
包内静态库基于 SQLite 3.46.1 amalgamation 构建。SQLite 属于 public domain。
本包用于配合 SQLitePCLRaw.lib.e_sqlite3 2.1.10 使用,该依赖由 SourceGear, LLC
以 Apache-2.0 许可发布。
English
StaticLink.e_sqlite3 is a static SQLite linking helper package for .NET
NativeAOT publishing.
It follows the StaticLink.Avalonia packaging model: once the NuGet package is
referenced, the package's buildTransitive MSBuild targets automatically select
the matching e_sqlite3 static library for the current RuntimeIdentifier when
publishing with PublishAot=true. The selected library is added to the NativeAOT
link step, and copied dynamic e_sqlite3 files from dependency packages are
removed from the publish directory.
This package only provides and links the native SQLite static library. It does
not replace the managed SQLite API. Use it together with Microsoft.Data.Sqlite,
SQLitePCLRaw.bundle_e_sqlite3, or another SQLitePCLRaw-based package.
Features
- Works by adding a NuGet package reference, with no manual
NativeLibraryitem required. - Selects the static library automatically from the publish
RuntimeIdentifier. - Supports Windows, Linux, Linux musl, and macOS.
- Useful for NativeAOT apps that want static SQLite linkage and fewer external
e_sqlite3dynamic-library dependencies.
Supported RIDs
win-x64win-x86win-arm64linux-x64linux-arm64linux-musl-x64linux-musl-arm64osx-x64osx-arm64
Install
dotnet add package StaticLink.e_sqlite3
Most applications should also reference the SQLitePCLRaw bundle, or another package that brings it in:
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.10" />
<PackageReference Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
It can also be used with Microsoft.Data.Sqlite:
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageReference Include="StaticLink.e_sqlite3" Version="2.1.10.1" />
Publish Example
dotnet publish -c Release -r linux-x64 -p:PublishAot=true -p:SelfContained=true
During publish, the package links the static library from static/<rid>/native.
If the target RID is not listed above, no static library is injected by this
package.
Source and License
The bundled static libraries are built from the SQLite 3.46.1 amalgamation.
SQLite is in the public domain. This package is designed to complement
SQLitePCLRaw.lib.e_sqlite3 2.1.10, which is distributed by SourceGear, LLC
under the Apache-2.0 license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- SQLitePCLRaw.lib.e_sqlite3 (>= 2.1.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.10.1 | 0 | 7/9/2026 |
中文: 提供 Windows, Linux, Linux musl 和 macOS 的 e_sqlite3 静态库及自动 AOT 链接目标。 English: Provides e_sqlite3 static libraries and automatic NativeAOT link targets for Windows, Linux, Linux musl, and macOS.