Skip to content

Dotnet backend

The code for this is inside the mise repository at ./src/backend/dotnet.rs.

Important

The dotnet backend requires having the .NET runtime installed. You can install it using mise:

sh
# 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.

Usage

The following installs the latest version of GitVersion.Tool and sets it as the active version on PATH:

sh
$ mise use dotnet:GitVersion.Tool@5.12.0
$ 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:

toml
[tools]
"dotnet:GitVersion.Tool" = "5.12.0"
sh
$ 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:

toml
[tools]
"dotnet:GitVersion.Tool" = "latest"

Supported Dotnet Syntax

DescriptionUsage
Dotnet shorthand latest versiondotnet:GitVersion.Tool
Dotnet shorthand for specific versiondotnet:GitVersion.Tool@5.12.0

Settings

Set these with mise settings set [VARIABLE] [VALUE] or by setting the environment variable listed.

dotnet.cli_telemetry_optout

  • Type: boolean(optional)
  • Env: MISE_DOTNET_CLI_TELEMETRY_OPTOUT
  • Default: None

When set to true, the DOTNET_CLI_TELEMETRY_OPTOUT environment variable is set to 1, disabling .NET CLI telemetry. When set to false, it is set to 0.

When unset (default), mise does not set the variable and .NET uses its own default behavior.

dotnet.dotnet_root

  • Type: string(optional)
  • Env: MISE_DOTNET_ROOT
  • Default: None

All .NET SDK versions are installed side-by-side under this directory, matching .NET's native multi-version model.

By default, mise uses ~/.local/share/mise/dotnet-root. Set this to override the location.

dotnet.isolated

  • Type: boolean
  • Env: MISE_DOTNET_ISOLATED
  • Default: false

When true, each SDK version is installed in its own directory under mise's installs path, like most other tools. dotnet --list-sdks will only show the active version.

When false (default), all SDK versions share a single DOTNET_ROOT directory and dotnet --list-sdks shows all installed versions, matching .NET's native side-by-side model.

dotnet.package_flagsdeprecated

  • Type: string[]
  • Env: MISE_DOTNET_PACKAGE_FLAGS(comma separated)
  • Default: []
  • Deprecated: Use the `prerelease = true` tool option or the global `prereleases` setting instead.

Deprecated. Use the prerelease = true tool option on a dotnet: tool, or the global prereleases setting, to include pre-release versions.

This legacy setting is a list of flags to extend the search and install abilities of dotnet tools. Because it is global, remove it before relying on prerelease = false per-tool opt-outs. The only supported flag is:

  • 'prerelease' : include pre-release versions in search and install

dotnet.registry_url

  • Type: string
  • Env: MISE_DOTNET_REGISTRY_URL
  • Default: https://api.nuget.org/v3/index.json

URL to fetch dotnet tools from. This is used when installing dotnet tools.

By default, mise will use the nuget API to fetch.

However, you can set this to a different URL if you have a custom feed or want to use a different source.

Tool Options

The following tool-options are available for the dotnet backend—these go in [tools] in mise.toml.

prerelease

By default, NuGet pre-release versions are excluded from mise ls-remote and from latest resolution. Set prerelease = true to include them:

toml
[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.

MIT LicenseCopyright © 2026en.dev