Examples
.NET repos with restore, build, and test
A .NET contract that keeps restore, build, and tests in order.
copynew usersbasicstable2026-05-30
Recommended next
Typical signals
- .NET 8
- restore before build
- build and test as explicit contract steps
Why it matters
- it turns a repo pattern into something humans, CI, and agents can read the same way
- it makes the next command obvious instead of implied by README drift
- it keeps readiness, setup, and execution explainable in receipts and diagnostics
Example contract
This example keeps the .NET flow deterministic: restore dependencies, build the project, then run tests.
ota.yamlyaml
version: 1project: name: basic-dotnet description: Basic .NET repo with dotnet tasks type: applicationtoolchains: dotnet: version: "8.0"tasks: setup: internal: true prepare: kind: dependency_hydration medium: package_dependencies source: kind: dotnet_restore cwd: . requirements: toolchains: - dotnet effects: writes: - obj network: true network_kind: dependency_hydration build: command: exe: dotnet args: - build depends_on: - setup requirements: toolchains: - dotnet test: command: exe: dotnet args: - test depends_on: - setup requirements: toolchains: - dotnetchecks: - name: dotnet-installed kind: precondition severity: error run: dotnet --versionagent: entrypoint: setup default_task: test safe_tasks: - setup - build - test verify_after_changes: - test