Installation
Biome can work with the test framework you already use. Start with the core package; add the EF Core integration if your tests need to persist the graph.
Requirements
- Starting with version 1.2.0, both packages target .NET 8, .NET 9, .NET 10, and .NET 11.
- .NET 10 SDK or newer to build, even when your project targets .NET 8 or .NET 9. Core APIs use C# 14 extension blocks, and the SDK ships the matching compiler (Roslyn 5). A
net11.0project needs the .NET 11 SDK. You do not need to setLangVersion. Build this repository with SDK 11.0.100 / C# 15. Generated graft methods are regular extension methods. - Any test framework. The examples use TUnit.
- The core package has no dependencies.
The EF integration selects the matching EF Core major with these minimum versions:
| Target framework | EF Core minimum |
|---|---|
| .NET 8 | 8.0.11 |
| .NET 9 | 9.0.0 |
| .NET 10 | 10.0.0 |
| .NET 11 | 11.0.0 |
Some seed examples use Guid.CreateVersion7, which requires .NET 9 or later. On .NET 8, use your app's UUIDv7 helper for seed IDs. Blueprint factories can use ctx.NewId on all four targets.
Add the packages
dotnet add package succeeds on an older SDK; the failure appears later, when the C# compiler can't read the extension-block APIs. Pin the SDK in global.json (see the tab below) so every machine and CI agent builds the same way.For manual setup, add the packages based on whether you need unit tests or integration tests:
# Start with the core package for in-memory setup.
dotnet add package Zeeq.Biome
# Add this package if tests save through a DbContext.
dotnet add package Zeeq.Biome.EntityFrameworkCore
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Runtime target: net8.0 and net9.0 work, but building them needs the .NET 10 SDK or newer. -->
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<!-- The core package builds test graphs in memory. Pin to a released version from NuGet. -->
<PackageReference Include="Zeeq.Biome" Version="1.2.0" />
<!-- Include the EF Core adapter when tests save the graph. -->
<PackageReference Include="Zeeq.Biome.EntityFrameworkCore" Version="1.2.0" />
</ItemGroup>
</Project>
Change TargetFramework to net9.0, net10.0, or net11.0 when that is your project target. Build with SDK 10 or later; net11.0 requires SDK 11. No LangVersion setting is needed.
{
"sdk": {
// Require SDK 10.0.100 or newer; latestFeature accepts a newer installed 10.0.x band.
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
<Project>
<ItemGroup>
<!-- Pin both packages here when using Central Package Management. -->
<PackageVersion Include="Zeeq.Biome" Version="x.y.z" />
<PackageVersion Include="Zeeq.Biome.EntityFrameworkCore" Version="x.y.z" />
</ItemGroup>
</Project>
Zeeq.Biome.EntityFrameworkCore when you want to save through a DbContext. For pure unit tests, the core package alone is enough.Input blueprint API version
Ordinary entity outputs for Blueprint.FromInput, and Blueprint.ChildFromInput, are available in Zeeq.Biome 1.1.0 and later. If you also use Zeeq.Biome.EntityFrameworkCore, use the matching package version. See Input blueprints for their behavior.
Namespaces
using Zeeq.Biome;
using Zeeq.Biome.EntityFrameworkCore; // Exposes db.AsBiomeStore() for EF Core tests.
Verify the install
To check the install before defining your app's blueprints, start a small session in a test. This example needs no store:
public sealed class InstallTests
{
[Test]
public async Task Biome_starts()
{
// With no store, the session can build without a database.
var biome = Biome.Start("America/Chicago", new BiomeOptions<string>());
await biome.BuildAsync();
}
}
string seed. The Quick start puts that value in a record and wraps the entry point in TestBiome.Local builds
Packages built from a clone report 0.0.0-local. Releases are versioned with Semantic Versioning, computed from Conventional Commits (feat: is a minor bump, fix: a patch, feat!: a major).