docs/dev-tools/backends/dotnet.md
The code for this is inside the mise repository at ./src/backend/dotnet.rs.
::: tip Important The dotnet backend requires having the .NET runtime installed. You can install it using mise:
# Install the latest version
mise use dotnet
# Or install a specific version (8, 9, etc.)
mise use dotnet@8
mise use dotnet@9
This will install the .NET runtime, which is required for dotnet tools to work properly. :::
The following installs the latest version of GitVersion.Tool and sets it as the active version on PATH:
$ mise use dotnet:[email protected]
$ dotnet-gitversion /version
5.12.0+Branch.support-5.x.Sha.3f75764963eb3d7956dcd5a40488c074dd9faf9e
The version will be set in ~/.config/mise/config.toml with the following format:
[tools]
"dotnet:GitVersion.Tool" = "5.12.0"
$ mise use dotnet:GitVersion.Tool
$ dotnet-gitversion /version
6.1.0+Branch.main.Sha.8856e3041dbb768118a55a31ad4e465ae70c6767
The version will be set in ~/.config/mise/config.toml with the following format:
[tools]
"dotnet:GitVersion.Tool" = "latest"
| Description | Usage |
|---|---|
| Dotnet shorthand latest version | dotnet:GitVersion.Tool |
| Dotnet shorthand for specific version | dotnet:[email protected] |
Set these with mise settings set [VARIABLE] [VALUE] or by setting the environment variable listed.
The following tool-options are available for the dotnet backend—these
go in [tools] in mise.toml.
prereleaseBy default, NuGet pre-release versions are excluded from mise ls-remote and from latest resolution. Set prerelease = true to include them:
[tools]
"dotnet:GitVersion.Tool" = { version = "latest", prerelease = true }
The legacy dotnet.package_flags = ["prerelease"] setting is deprecated. Prefer the per-tool prerelease = true option, or the global prereleases setting when every tool should include pre-release versions. Because dotnet.package_flags is global, remove it before relying on prerelease = false per-tool opt-outs.