Skip to content

Installation

Jonatan edited this page Aug 10, 2026 · 2 revisions

Installation

SharpAccess requires Windows, PowerShell 7 for repository operations, and .NET 10 selected by the repository global.json.

Note

The commands below install the published 0.9.0-rc.1 cohort from NuGet. SharpAccess.Core, SharpAccess.Sqlite, and SharpAccess.Postgres are available at that release-candidate version.

Choose one package set

SQLite

dotnet add package SharpAccess.Core --version 0.9.0-rc.1
dotnet add package SharpAccess.Sqlite --version 0.9.0-rc.1

PostgreSQL

dotnet add package SharpAccess.Core --version 0.9.0-rc.1
dotnet add package SharpAccess.Postgres --version 0.9.0-rc.1

Warning

Install and register exactly one supported DB provider as primary persistence. Do not register SQLite and PostgreSQL together.

Register SharpAccess

builder.Services.AddSharpAccess(builder.Configuration);

// Choose exactly one:
builder.Services.AddSqliteAccess(builder.Configuration);
// builder.Services.AddPostgresAccess(builder.Configuration);

Initialize the schema before serving requests:

await app.Services.InitializeSharpAccessAsync(
    app.Lifetime.ApplicationStopping);

Then add the SharpAccess middleware and endpoints:

app.UseSharpAccessExceptionHandling();
app.UseSharpAccessSecurityHeaders();
app.UseSharpAccess();
app.MapSharpAccessEndpoints();

Package status

SharpAccess.Core, SharpAccess.Sqlite, and SharpAccess.Postgres are the supported package cohort. SQL Server and MySQL are roadmap-only and must not be presented as available provider packages.

More detail

Clone this wiki locally