dotnet

Provides build, test, pack, and publish helpers for .NET SDK projects (*.csproj/*.fsproj). Infers project references to wire Terrabuild dependencies and defaults outputs to bin/, obj/, and build logs.

Available Commands

CommandDescription
toolExecutes dotnet tool ... commands.
testRuns tests via dotnet test, optionally batched through a generated solution.
restoreRestores NuGet packages, optionally frozen, forcing evaluation, or batching workspace projects into a temporary solution.
publishPublishes binaries via dotnet publish, optionally self-contained/trimmed and batched via a generated solution.
packPacks the project into a NuGet package via dotnet pack.
buildBuild project.
<command>Runs an arbitrary dotnet command (action name is forwarded to dotnet).

Project Initializer

Infers project metadata from the nearest SDK project file (dependencies and default outputs).

project {
  @dotnet { }
}

Equivalent to:

project {
    ignores = [ "**/*.binlog" ]
    outputs = [ "bin/" "obj/" "**/*.binlog" ]
    dependencies = [ <ProjectReference /> from project ]
}
Last updated on