Skip to content

.NET

The core .NET plugin installs .NET SDKs using Microsoft's official install script. All SDK versions are installed side-by-side under a shared DOTNET_ROOT directory, matching .NET's native multi-version model. This means dotnet --list-sdks will see every version you've installed through mise.

Unlike most tools, the SDKs don't live inside ~/.local/share/mise/installs because they share a common root. mise symlinks the install path to DOTNET_ROOT and sets environment variables so the correct SDK is picked up.

INFO

This plugin manages the .NET SDK itself. To install .NET global tools (e.g., dotnet-ef), use the dotnet backend with dotnet:ToolName syntax.

Usage

Use the latest .NET SDK:

sh
mise use -g dotnet@latest
dotnet --version

Use a specific version:

sh
mise use -g dotnet@8.0.400
dotnet --version

Install multiple SDKs side-by-side for multi-targeting:

sh
mise use dotnet@8
mise use dotnet@9
dotnet --list-sdks

global.json support

mise recognizes global.json as an idiomatic version file. If your project contains a global.json with an SDK version, mise will automatically use it:

json
{
  "sdk": {
    "version": "8.0.100"
  }
}

Enable idiomatic version file support:

sh
mise settings set idiomatic_version_file_enable_tools dotnet

Isolated Mode

By default, all SDK versions share a single DOTNET_ROOT directory. This matches .NET's native side-by-side model and means dotnet --list-sdks shows every installed version.

If you prefer the traditional mise approach where each version gets its own directory, enable isolated mode:

sh
mise settings set dotnet.isolated true

In isolated mode each SDK version is installed under ~/.local/share/mise/installs/dotnet/<version>/, just like most other mise-managed tools. dotnet --list-sdks will only report the currently active version.

Shared (default)Isolated
dotnet --list-sdksAll installed versionsActive version only
Install locationDOTNET_ROOTinstalls/dotnet/<version>/
Multi-targetingWorks out of the boxRequires switching versions

Environment Variables

The plugin sets the following environment variables:

VariableValue
DOTNET_ROOTShared SDK install directory (or install path if isolated)
DOTNET_MULTILEVEL_LOOKUP0
DOTNET_CLI_TELEMETRY_OPTOUTOnly set when dotnet.cli_telemetry_optout is configured

Settings

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_flags

  • Type: string[]
  • Env: MISE_DOTNET_PACKAGE_FLAGS(comma separated)
  • Default: []

This is a list of flags to extend the search and install abilities of dotnet tools.

Here are the available flags:

  • 'prerelease' : include prerelease 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.

Licensed under the MIT License. Maintained by @jdx and friends.