Documentation Index
Fetch the complete documentation index at: https://buildcharts.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker with
buildx - BuildCharts installed
- A repository root that contains a
.slnor.slnxfiles
Scaffold a repository
Runbuildcharts init from the repository root.
- Creates
build.yml - Creates
charts/buildcharts/Chart.yaml - Creates
.github/workflows/buildcharts.ymlwhen the Git remote points to GitHub
| Target | Description |
|---|---|
build | global.json or target frameworks help determine the .NET SDK base image version |
test | Test package references such as Microsoft.NET.Test.Sdk, xunit, or nunit |
nuget | Package metadata such as <PackageId> or <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
docker | A local Dockerfile in a project folder |
Use the built-in .NET charts
BuildCharts ships with first-class .NET charts for common stage types. These are a practical starting point when you want working defaults before you introduce your own chart ecosystem. The built-in .NET chart set is documented here: The shipped Dockerfiles cover the common .NET workflows:buildrunsdotnet buildtestrunsdotnet testand prepares test artifactsnugetrunsdotnet packand prepares package outputpublishrunsdotnet publishdockerpublishes the app and assembles the runtime image
build.yml.
Dependency chart
build.yml to the built-in .NET charts.
Review the generated metadata
This shape matches the shipped samples:You must define exactly one
build target.Parallelization: multiple targets vs dotnet test
build and test can also be placed directly on the solution target. This works well for .NET because dotnet build and dotnet test can run directly against a solution, so the solution can act as the shared source for both stages:
dotnet test, which then delegates to the test framework and runner, such as xUnit, NUnit, or MSTest.
The tradeoff is execution strategy:
- Solution-level
testkeeps the config simpler and matches normal .NET workflows - Separate test targets can let Docker Bake parallelize more work across targets
- Separate targets may also benefit differently from Docker layer caching
Create a lock file (optional)
Pin chart digests to make generation repeatable and avoid accidental drift. When a lock file is present,buildcharts generate checks for mismatches against charts/buildcharts/Chart.yaml before generating the build plan. For details, see Lock files.
Create the lock file with:
Generate and run the plan
Bash:Signature verification (optional)
The built-in .NET charts are published as OCI artifacts and signed with Cosign in GitHub Actions. You can verify a chart signature before using or trusting a chart digest. Installcosign and verify the chart by digest:
charts/buildcharts/Chart.lock. That makes the lock file the natural source for verification input during CI or review.
