Purview.Containers.Redis
1.0.0-prerelease.11
dotnet add package Purview.Containers.Redis --version 1.0.0-prerelease.11
NuGet\Install-Package Purview.Containers.Redis -Version 1.0.0-prerelease.11
<PackageReference Include="Purview.Containers.Redis" Version="1.0.0-prerelease.11" />
<PackageVersion Include="Purview.Containers.Redis" Version="1.0.0-prerelease.11" />
<PackageReference Include="Purview.Containers.Redis" />
paket add Purview.Containers.Redis --version 1.0.0-prerelease.11
#r "nuget: Purview.Containers.Redis, 1.0.0-prerelease.11"
#:package Purview.Containers.Redis@1.0.0-prerelease.11
#addin nuget:?package=Purview.Containers.Redis&version=1.0.0-prerelease.11&prerelease
#tool nuget:?package=Purview.Containers.Redis&version=1.0.0-prerelease.11&prerelease
Purview.Containers.Redis
Throwaway Redis-compatible instances for .NET integration testing on WSL Containers (WSLC) or Docker.
dotnet add package Purview.Containers.Redis
Backend-neutral: depends on Purview.Containers.Core and needs a backend package (Purview.Containers.Wsl or Purview.Containers.Docker). StackExchange.Redis is not referenced by this
package — bring your own client.
Requirements
- WSL Containers backend: Windows 10/11 with WSL Containers (
wsl --install --no-distribution), and a.NET 10or later project. A platform-neutralnet10.0project binds the portable facade and gets automatic WSLC-or-Docker selection; a Windows target framework (net10.0-windows10.0.19041.0, x64 or arm64) binds the implementation directly. ThePurview.Containers.Wslpackage suppliesbuildTransitivedefaults forWindowsSdkPackageVersion/PlatformTargetand (for a platform-neutral consumer on a Windows build host) the implementation payload, rejecting an unsupported consumer withPCC0001/PCC0002— see the consumer requirements. - Docker backend: any reachable Docker daemon (
docker info), with anet10.0or later project on any platform. No Windows target framework and noPCCguards apply. - Experimental: the API, defaults and packaging can change between prereleases; there is no production support guarantee.
Quick start
using Purview.Containers.Redis;
using StackExchange.Redis;
await using var redis = new RedisBuilder().Build();
await redis.StartAsync(); // waits for redis-cli ping
using var connection = await ConnectionMultiplexer.ConnectAsync(redis.GetConnectionString());
await connection.GetDatabase().PingAsync();
API
| Member | Purpose |
|---|---|
RedisBuilder() / RedisBuilder(string image) |
Default image redis:7, or a custom image. |
RedisBuilder.RedisPort (6379) |
Container port, mapped to a random host port. |
RedisContainer.GetConnectionString() |
localhost:{mappedPort} for ConnectionMultiplexer.ConnectAsync. |
The default wait strategy runs redis-cli ping inside the container unless you supply your own with
WithWaitStrategy(...). Call GetConnectionString() after StartAsync().
Redis-compatible images
The module is a thin Redis client-neutral wrapper, so other Redis-compatible servers work through the image constructor:
await using var valkey = new RedisBuilder("valkey/valkey:7").Build();
await using var garnet = new RedisBuilder("ghcr.io/microsoft/garnet:latest").Build();
Documentation
- Backends: WSLC or Docker — choosing and configuring the runtime.
- Modules — the module contract and readiness choices.
- Wait Strategies — overriding readiness checks.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.11.0)
- Purview.Containers.Core (>= 1.0.0-prerelease.11)
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 |
|---|---|---|
| 1.0.0-prerelease.11 | 21 | 11/3/2026 |
| 1.0.0-prerelease.10 | 57 | 10/29/2026 |
| 1.0.0-prerelease.9 | 58 | 10/27/2026 |
| 1.0.0-prerelease.8 | 66 | 10/22/2026 |
| 1.0.0-prerelease.7 | 69 | 10/16/2026 |
| 1.0.0-prerelease.6 | 70 | 10/6/2026 |
| 1.0.0-prerelease.5 | 71 | 10/2/2026 |
| 1.0.0-prerelease.4 | 71 | 10/2/2026 |
| 1.0.0-prerelease.3 | 65 | 10/2/2026 |
| 1.0.0-prerelease.2 | 61 | 10/1/2026 |