Purview.Containers.Core
1.0.0-prerelease.5
dotnet add package Purview.Containers.Core --version 1.0.0-prerelease.5
NuGet\Install-Package Purview.Containers.Core -Version 1.0.0-prerelease.5
<PackageReference Include="Purview.Containers.Core" Version="1.0.0-prerelease.5" />
<PackageVersion Include="Purview.Containers.Core" Version="1.0.0-prerelease.5" />
<PackageReference Include="Purview.Containers.Core" />
paket add Purview.Containers.Core --version 1.0.0-prerelease.5
#r "nuget: Purview.Containers.Core, 1.0.0-prerelease.5"
#:package Purview.Containers.Core@1.0.0-prerelease.5
#addin nuget:?package=Purview.Containers.Core&version=1.0.0-prerelease.5&prerelease
#tool nuget:?package=Purview.Containers.Core&version=1.0.0-prerelease.5&prerelease
Purview.Containers.Core
Backend-neutral container testing abstractions for .NET — the shared surface behind
Purview.Containers.Wsl (WSL Containers) and
Purview.Containers.Docker (Docker Engine via Testcontainers).
dotnet add package Purview.Containers.Core
Most consumers reference Purview.Containers (the
bundle that brings this package plus both backends), a single backend package, or a service module
instead; this package arrives transitively and supplies the model plus the backend registration hook. The
public namespace is Purview.Containers, so consumer code that uses it never needs to know it is a
separate package.
What is in the package
| Area | Types |
|---|---|
| Container contract | IContainer, IContainerConfiguration, ContainerConfiguration, ContainerBuilder<TBuilder, TContainer, TConfiguration>, ContainerBase |
| Connection strings | IConnectionStringProvider, IConnectionStringProvider<TContainer, TConfiguration>, ContainerConnectionStringProvider<TContainer, TConfiguration>, ConnectionMode |
| Backends | IContainerBackend, ContainerBackendInfo, ContainerBackends, ContainerBackendUnavailableException |
| Readiness | Purview.Containers.Waiting: Wait, IWaitStrategy, TCP/HTTP/command/log strategies |
| Configuration model | PortBinding, BindMount, NamedVolume, RegistryCredentials, Image, PullPolicy |
| Diagnostics | Secret, SecretRedactor, ContainerState, ExecResult, ContainerLogEntry |
| Errors | Purview.Containers.Runtime: ContainerException and its specialisations |
Backend selection
A container is produced by an IContainerBackend. Backend packages register themselves into the
consuming assembly through the buildTransitive assets shipped here:
// generated by Purview.Containers.Core.targets
[ModuleInitializer]
internal static void Initialize()
{
ContainerBackends.Register(WslContainerBackend.Create());
}
ContainerBackends.ResolveAsync() picks the backend with this precedence:
| # | Rule | How |
|---|---|---|
| 1 | Pinned instance | ContainerBackends.Use(new WslContainerBackend()), or WithBackend(...) on one builder |
| 2 | Named backend | ContainerBackends.Use(ContainerBackendSelection.Named("docker")), or PURVIEW_CONTAINERS_BACKEND=docker |
| 3 | Automatic detection | probe every registered backend; the first usable one wins (WSLC before Docker) |
PURVIEW_CONTAINERS_BACKEND accepts auto (the default) or a backend name, and is case-insensitive.
A named or pinned backend never silently falls back: if it is missing or unusable, the resolution
fails with that backend's own diagnostics. When nothing is usable, the error lists every backend's
availability, version and missing components, and names the fix. Results are cached per process, so the
probe cost is paid once.
ContainerBackends.ProbeAllAsync() returns the same probe information without selecting anything, for
callers that want to apply their own policy.
Requirements
- .NET 10 or later, any platform (this package is portable).
- A backend package:
Purview.Containers.Wsl(WSLC on a Windows host),Purview.Containers.Docker(Docker Engine reachable from the test host), or both — or the umbrellaPurview.Containers, which brings this package plus both backends for automatic selection.
Related
- Purview.Containers.Wsl — WSL Containers backend.
- Documentation wiki: https://github.com/purview-dev/containers/tree/main/docs/wiki.
Experimental. The public API, defaults and packaging rules can change between prereleases, and there is no production support guarantee. Pin the exact package version you build against.
| 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.10.0)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Purview.Containers.Core:
| Package | Downloads |
|---|---|
|
Purview.Containers.Azurite
Azurite module for Purview.Containers: throwaway Azure Storage emulators (blob/queue/table) on WSL Containers or Docker. |
|
|
Purview.Containers.Docker
Docker backend for Purview.Containers: throwaway containers from any reachable Docker daemon, driven by Testcontainers. |
|
|
Purview.Containers.MsSql
Microsoft SQL Server module for Purview.Containers: throwaway SQL Server databases on WSL Containers or Docker. |
|
|
Purview.Containers.MySql
MySQL module for Purview.Containers: throwaway MySQL databases on WSL Containers or Docker. |
|
|
Purview.Containers.Nats
NATS module for Purview.Containers: throwaway NATS message brokers on WSL Containers or Docker. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-prerelease.5 | 0 | 10/2/2026 |
| 1.0.0-prerelease.4 | 4 | 10/2/2026 |
| 1.0.0-prerelease.3 | 20 | 10/2/2026 |
| 1.0.0-prerelease.2 | 32 | 10/1/2026 |