# Dotnet (/pipeline-sdk/reference/toolchains/dotnet)



{/* Generated by docs-site/scripts/generate-dsl-docs.ts — do not edit. */}

## `dotnet` [#dotnet]

Callable singleton for the dotnet toolchain — access as `hm.dotnet`.

Call directly to construct a `DotnetProject`, or use the bare-form
action methods (`dotnet.build()`, `dotnet.test()`, etc.) for a
one-shot leaf.

```python
dotnet(*, path='.', channel='8.0', image=None, base=None) -> DotnetProject
```

| Parameter                                           | Type           | Default | Description                                              |
| --------------------------------------------------- | -------------- | ------- | -------------------------------------------------------- |
| `path`                                              | `str`          | `'.'`   | Path to the .NET project root.                           |
| `channel`                                           | `str`          | `'8.0'` | .NET SDK channel to install. Use a version like          |
| `"8.0"`, or a release band like `"LTS"` or `"STS"`. |                |         |                                                          |
| `image`                                             | `str \| None`  | `None`  | Local-mode Docker base image override.                   |
| `base`                                              | `Step \| None` | `None`  | Existing `Step` to attach to instead of emitting a fresh |
| apt-base step.                                      |                |         |                                                          |

**Returns** `DotnetProject` — A `DotnetProject` ready for action methods.

### `dotnet.build()` [#dotnetbuild]

```python
build(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `dotnet.fmt()` [#dotnetfmt]

```python
fmt(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `dotnet.test()` [#dotnettest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

## `DotnetEntry` [#dotnetentry]

Callable singleton for the dotnet toolchain — access as `hm.dotnet`.

Call directly to construct a `DotnetProject`, or use the bare-form
action methods (`dotnet.build()`, `dotnet.test()`, etc.) for a
one-shot leaf.

### `DotnetEntry.build()` [#dotnetentrybuild]

```python
build(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `DotnetEntry.fmt()` [#dotnetentryfmt]

```python
fmt(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `DotnetEntry.test()` [#dotnetentrytest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

## `DotnetProject` [#dotnetproject]

dotnet (C#) project install chain — constructed via `hm.dotnet()`.

`installed` is the dotnet-install step. Action methods (`build`,
`test`, `fmt`) attach leaves to `installed`.

### Fields [#fields]

| Field       | Type   | Default    |
| ----------- | ------ | ---------- |
| `path`      | `str`  | *required* |
| `installed` | `Step` | *required* |

### `DotnetProject.build()` [#dotnetprojectbuild]

```python
build(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `DotnetProject.fmt()` [#dotnetprojectfmt]

```python
fmt(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`

### `DotnetProject.test()` [#dotnetprojecttest]

```python
test(**kw) -> Step
```

| Parameter | Type  | Default | Description |
| --------- | ----- | ------- | ----------- |
| `kw`      | `Any` | `{}`    | —           |

**Returns** `Step`
