https://github.com/powersync-ja/powersync-dotnet
SDK that enables local-first and real-time reactive apps with embedded SQLite for .NET clients
https://github.com/powersync-ja/powersync-dotnet
local-first local-storage offline offline-first powersync sql sqlite state-management sync
Last synced: about 1 month ago
JSON representation
SDK that enables local-first and real-time reactive apps with embedded SQLite for .NET clients
- Host: GitHub
- URL: https://github.com/powersync-ja/powersync-dotnet
- Owner: powersync-ja
- License: apache-2.0
- Created: 2024-11-29T13:53:24.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T09:02:37.000Z (about 2 months ago)
- Last Synced: 2025-05-01T07:42:52.506Z (about 1 month ago)
- Topics: local-first, local-storage, offline, offline-first, powersync, sql, sqlite, state-management, sync
- Language: C#
- Homepage: https://www.powersync.com
- Size: 446 KB
- Stars: 4
- Watchers: 9
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._
# PowerSync .NET SDKs
`powersync-dotnet` is the monorepo for PowerSync .NET SDKs.
## Monorepo Structure: Packages
Packages are published to [NuGet](https://www.nuget.org/profiles/PowerSync).
- [PowerSync/Common](./PowerSync/Common/README.md)
- Core package: .NET implementation of a PowerSync database connector and streaming sync bucket implementation. Packages meant for specific platforms will extend functionality of `Common`.
## Demo Apps / Example Projects
Demo applications are located in the [`demos/`](./demos/) directory. Also see our [Demo Apps / Example Projects](https://docs.powersync.com/resources/demo-apps-example-projects) gallery which lists all projects by the backend and client-side framework they use.
### Command-Line
- [demos/CommandLine](./demos/CommandLine/README.md): A CLI to-do list example app using a Node-js backend.
# Supported Frameworks
This PowerSync SDK currently targets the following .NET versions:
- **.NET 9** - [Latest version](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
- **.NET 8** - [Current LTS Version, used for development of this project](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- **.NET 6** - supported for compatibility with older projects)
- **.NET Standard 2.0** - for compatibility with older libraries and frameworks, tested/verified older versions will be listed below.- .NET Framework 4.8:
To get a .NET Framework 4.8 working with this SDK add the following to your `.csproj` file:```xml
...
win-x86;win-x64
win-x64
...
```and create a `IsExternalInit.cs` file in your project with the following contents:
```cs
using System.ComponentModel;namespace System.Runtime.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
internal class IsExternalInit { }
}
```
-------When running commands such as `dotnet run` or `dotnet test`, you may need to specify the target framework explicitly using the `--framework` flag.
# Development
Download PowerSync extension
```bash
dotnet run --project Tools/Setup
```Install dependencies
```bash
dotnet restore
```## Tests
Run all tests
```bash
dotnet test -v n --framework net8.0
```Run a specific test
```bash
dotnet test -v n --framework net8.0 --filter "test-file-pattern"
```## Using the PowerSync.Common package in your project
```bash
dotnet add package PowerSync.Common --prerelease
```