.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:
mise use -g dotnet@latest
dotnet --versionUse a specific version:
mise use -g dotnet@8.0.400
dotnet --versionInstall multiple SDKs side-by-side for multi-targeting:
mise use dotnet@8
mise use dotnet@9
dotnet --list-sdksglobal.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:
{
"sdk": {
"version": "8.0.100"
}
}Enable idiomatic version file support:
mise settings set idiomatic_version_file_enable_tools dotnetIsolated 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:
mise settings set dotnet.isolated trueIn 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-sdks | All installed versions | Active version only |
| Install location | DOTNET_ROOT | installs/dotnet/<version>/ |
| Multi-targeting | Works out of the box | Requires switching versions |
Runtime-only Installs
By default, mise installs the full .NET SDK. If you only need to run .NET applications without building them and without the added overhead of the SDK, you can install just the runtime using the runtime inline option:
mise use dotnet[runtime=dotnet]@8.0.14
dotnet --list-runtimesValid runtime values
| Value | Framework | Use case |
|---|---|---|
| dotnet | Microsoft.NETCore.App | Console apps, libraries |
| aspnetcore | Microsoft.AspNetCore.App | ASP.NET Core web apps |
| windowsdesktop | Microsoft.WindowsDesktop.App | WPF / WinForms (Windows) |
Example: mix SDK and runtime
You can install a full SDK for development alongside a runtime for a production-like environment:
[tools]
dotnet = ["9", { version = "8.0.14", runtime = "dotnet" }]WARNING
- Version numbers are runtime versions, not SDK versions. For example,
8.0.14refers to .NET Runtime 8.0.14, not SDK 8.0.14. Check the .NET release notes for available runtime versions. - Runtime-only installs do not include the SDK build tools. Commands like
dotnet buildanddotnet publishwill not be available, anddotnet --versionwill not report an SDK version.
TIP
Only exact runtime versions are supported (e.g., dotnet[runtime=dotnet]@8.0.14). Channel syntax like @8 is not currently supported for runtime installs, as it resolves against SDK versions rather than runtime versions.
Environment Variables
The plugin sets the following environment variables:
| Variable | Value |
|---|---|
DOTNET_ROOT | Shared SDK install directory (or install path if isolated) |
DOTNET_MULTILEVEL_LOOKUP | 0 |
DOTNET_CLI_TELEMETRY_OPTOUT | Only 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.