--- url: /lang/dotnet.md --- # .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](/dev-tools/backends/dotnet.html) 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//`, 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//` | | Multi-targeting | Works out of the box | Requires switching 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 --- --- url: /cli/activate.md --- # `mise activate` * **Usage**: `mise activate [FLAGS] [SHELL_TYPE]` * **Source code**: [`src/cli/activate.rs`](https://github.com/jdx/mise/blob/main/src/cli/activate.rs) Initializes mise in the current shell session This should go into your shell's rc file or login shell. Otherwise, it will only take effect in the current session. (e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash\_profile, ~/.profile, ~/.config/fish/config.fish, or $PROFILE for powershell) Typically, this can be added with something like the following: ``` echo 'eval "$(mise activate zsh)"' >> ~/.zshrc ``` However, this requires that "mise" is in your PATH. If it is not, you need to specify the full path like this: ``` echo 'eval "$(/path/to/mise activate zsh)"' >> ~/.zshrc ``` Customize status output with `status` settings. ## Arguments ### `[SHELL_TYPE]` Shell type to generate the script for **Choices:** * `bash` * `elvish` * `fish` * `nu` * `xonsh` * `zsh` * `pwsh` ## Flags ### `-q --quiet` Suppress non-error messages ### `--no-hook-env` Do not automatically call hook-env This can be helpful for debugging mise. If you run `eval "$(mise activate --no-hook-env)"`, then you can call `mise hook-env` manually which will output the env vars to stdout without actually modifying the environment. That way you can do things like `mise hook-env --trace` to get more information or just see the values that hook-env is outputting. ### `--shims` Use shims instead of modifying PATH Effectively the same as: ``` PATH="$HOME/.local/share/mise/shims:$PATH" ``` `mise activate --shims` does not support all the features of `mise activate`. See for more information Examples: ``` eval "$(mise activate bash)" eval "$(mise activate zsh)" mise activate fish | source execx($(mise activate xonsh)) (&mise activate pwsh) | Out-String | Invoke-Expression ``` --- --- url: /cli/backends/ls.md --- # `mise backends ls` * **Usage**: `mise backends ls` * **Aliases**: `list` * **Source code**: [`src/cli/backends/ls.rs`](https://github.com/jdx/mise/blob/main/src/cli/backends/ls.rs) List built-in backends Examples: ``` $ mise backends ls aqua asdf cargo core dotnet gem go npm pipx spm ubi vfox ``` --- --- url: /cli/backends.md --- # `mise backends` * **Usage**: `mise backends ` * **Aliases**: `b` * **Source code**: [`src/cli/backends/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/backends/mod.rs) Manage backends ## Subcommands * [`mise backends ls`](/cli/backends/ls.md) --- --- url: /cli/bin-paths.md --- # `mise bin-paths` * **Usage**: `mise bin-paths [TOOL@VERSION]…` * **Source code**: [`src/cli/bin_paths.rs`](https://github.com/jdx/mise/blob/main/src/cli/bin_paths.rs) List all the active runtime bin paths ## Arguments ### `[TOOL@VERSION]…` Tool(s) to look up e.g.: ruby@3 --- --- url: /cli/cache/clear.md --- # `mise cache clear` * **Usage**: `mise cache clear [PLUGIN]…` * **Aliases**: `c` * **Source code**: [`src/cli/cache/clear.rs`](https://github.com/jdx/mise/blob/main/src/cli/cache/clear.rs) Deletes all cache files in mise ## Arguments ### `[PLUGIN]…` Plugin(s) to clear cache for e.g.: node, python --- --- url: /cli/cache/path.md --- # `mise cache path` * **Usage**: `mise cache path` * **Aliases**: `dir` * **Source code**: [`src/cli/cache/path.rs`](https://github.com/jdx/mise/blob/main/src/cli/cache/path.rs) Show the cache directory path --- --- url: /cli/cache/prune.md --- # `mise cache prune` * **Usage**: `mise cache prune [-v --verbose…] [--dry-run] [PLUGIN]…` * **Aliases**: `p` * **Source code**: [`src/cli/cache/prune.rs`](https://github.com/jdx/mise/blob/main/src/cli/cache/prune.rs) Removes stale mise cache files By default, this command will remove files that have not been accessed in 30 days. Change this with the MISE\_CACHE\_PRUNE\_AGE environment variable. ## Arguments ### `[PLUGIN]…` Plugin(s) to clear cache for e.g.: node, python ## Flags ### `-v --verbose…` Show pruned files ### `--dry-run` Just show what would be pruned --- --- url: /cli/cache.md --- # `mise cache` * **Usage**: `mise cache ` * **Source code**: [`src/cli/cache/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/cache/mod.rs) Manage the mise cache Run `mise cache` with no args to view the current cache directory. ## Subcommands * [`mise cache clear [PLUGIN]…`](/cli/cache/clear.md) * [`mise cache path`](/cli/cache/path.md) * [`mise cache prune [-v --verbose…] [--dry-run] [PLUGIN]…`](/cli/cache/prune.md) --- --- url: /cli/completion.md --- # `mise completion` * **Usage**: `mise completion [--include-bash-completion-lib] [SHELL]` * **Source code**: [`src/cli/completion.rs`](https://github.com/jdx/mise/blob/main/src/cli/completion.rs) Generate shell completions ## Arguments ### `[SHELL]` Shell type to generate completions for **Choices:** * `bash` * `fish` * `powershell` * `zsh` ## Flags ### `--include-bash-completion-lib` Include the bash completion library in the bash completion script This is required for completions to work in bash, but it is not included by default you may source it separately or enable this flag to enable it in the script. Examples: ``` mise completion bash --include-bash-completion-lib > ~/.local/share/bash-completion/completions/mise mise completion zsh > /usr/local/share/zsh/site-functions/_mise mise completion fish > ~/.config/fish/completions/mise.fish mise completion powershell >> $PROFILE ``` --- --- url: /cli/config/get.md --- # `mise config get` * **Usage**: `mise config get [-f --file ] [KEY]` * **Source code**: [`src/cli/config/get.rs`](https://github.com/jdx/mise/blob/main/src/cli/config/get.rs) Display the value of a setting in a mise.toml file ## Arguments ### `[KEY]` The path of the config to display ## Flags ### `-f --file ` The path to the mise.toml file to edit If not provided, the nearest mise.toml file will be used Examples: ``` $ mise toml get tools.python 3.12 ``` --- --- url: /cli/config/ls.md --- # `mise config ls` * **Usage**: `mise config ls [FLAGS]` * **Aliases**: `list` * **Source code**: [`src/cli/config/ls.rs`](https://github.com/jdx/mise/blob/main/src/cli/config/ls.rs) List config files currently in use ## Flags ### `-J --json` Output in JSON format ### `--no-header` Do not print table header ### `--tracked-configs` List all tracked config files Examples: ``` $ mise config ls Path Tools ~/.config/mise/config.toml pitchfork ~/src/mise/mise.toml actionlint, bun, cargo-binstall, cargo:cargo-edit, cargo:cargo-insta ``` --- --- url: /cli/config/set.md --- # `mise config set` * **Usage**: `mise config set [-f --file ] [-t --type ] [VALUE]` * **Source code**: [`src/cli/config/set.rs`](https://github.com/jdx/mise/blob/main/src/cli/config/set.rs) Set the value of a setting in a mise.toml file ## Arguments ### `` The path of the config to display ### `[VALUE]` The value to set the key to (optional if provided as KEY=VALUE) ## Flags ### `-f --file ` The path to the mise.toml file to edit If not provided, the nearest mise.toml file will be used ### `-t --type ` **Choices:** * `infer` * `string` * `integer` * `float` * `bool` * `list` * `set` **Default:** `infer` Examples: ``` $ mise config set tools.python 3.12 $ mise config set settings.always_keep_download true $ mise config set env.TEST_ENV_VAR ABC $ mise config set settings.disable_tools --type list node,rust # Type for `settings` is inferred $ mise config set settings.jobs 4 ``` --- --- url: /cli/config.md --- # `mise config` * **Usage**: `mise config [FLAGS] ` * **Aliases**: `cfg` * **Source code**: [`src/cli/config/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/config/mod.rs) Manage config files ## Flags ### `-J --json` Output in JSON format ### `--no-header` Do not print table header ### `--tracked-configs` List all tracked config files ## Subcommands * [`mise config get [-f --file ] [KEY]`](/cli/config/get.md) * [`mise config ls [FLAGS]`](/cli/config/ls.md) * [`mise config set [-f --file ] [-t --type ] [VALUE]`](/cli/config/set.md) Examples: ``` $ mise config ls Path Tools ~/.config/mise/config.toml pitchfork ~/src/mise/mise.toml actionlint, bun, cargo-binstall, cargo:cargo-edit, cargo:cargo-insta ``` --- --- url: /cli/deactivate.md --- # `mise deactivate` * **Usage**: `mise deactivate` * **Source code**: [`src/cli/deactivate.rs`](https://github.com/jdx/mise/blob/main/src/cli/deactivate.rs) Disable mise for current shell session This can be used to temporarily disable mise in a shell session. Examples: ``` mise deactivate ``` --- --- url: /cli/doctor/path.md --- # `mise doctor path` * **Usage**: `mise doctor path [-f --full]` * **Source code**: [`src/cli/doctor/path.rs`](https://github.com/jdx/mise/blob/main/src/cli/doctor/path.rs) Print the current PATH entries mise is providing ## Flags ### `-f --full` Print all entries including those not provided by mise Examples: ``` Get the current PATH entries mise is providing $ mise doctor path /home/user/.local/share/mise/installs/node/24.0.0/bin /home/user/.local/share/mise/installs/rust/1.90.0/bin /home/user/.local/share/mise/installs/python/3.10.0/bin ``` --- --- url: /cli/doctor.md --- # `mise doctor` * **Usage**: `mise doctor [-J --json] ` * **Aliases**: `dr` * **Source code**: [`src/cli/doctor/mod.rs`](https://github.com/jdx/mise/blob/main/src/cli/doctor/mod.rs) Check mise installation for possible problems ## Flags ### `-J --json` ## Subcommands * [`mise doctor path [-f --full]`](/cli/doctor/path.md) Examples: ``` $ mise doctor [WARN] plugin node is not installed ``` --- --- url: /cli/edit.md --- # `mise edit` * **Usage**: `mise edit [-n --dry-run] [-t --tool-versions ] [PATH]` * **Source code**: [`src/cli/edit.rs`](https://github.com/jdx/mise/blob/main/src/cli/edit.rs) Edit mise.toml interactively ## Arguments ### `[PATH]` Path to the config file to create ## Flags ### `-n --dry-run` Show what would be generated without writing to file ### `-t --tool-versions ` Path to a .tool-versions file to import tools from Examples: ``` mise edit # edit mise.toml interactively mise edit .mise.toml # edit a specific file mise edit -y # skip interactive editor mise edit -n # preview without writing ``` --- --- url: /cli/en.md --- # `mise en` * **Usage**: `mise en [-s --shell ] [DIR]` * **Source code**: [`src/cli/en.rs`](https://github.com/jdx/mise/blob/main/src/cli/en.rs) Starts a new shell with the mise environment built from the current configuration This is an alternative to `mise activate` that allows you to explicitly start a mise session. It will have the tools and environment variables in the configs loaded. Note that changing directories will not update the mise environment. ## Arguments ### `[DIR]` Directory to start the shell in **Default:** `.` ## Flags ### `-s --shell ` Shell to start Defaults to $SHELL Examples: ``` $ mise en . $ node -v v20.0.0 Skip loading bashrc: $ mise en -s "bash --norc" Skip loading zshrc: $ mise en -s "zsh -f" ``` --- --- url: /cli/env.md --- # `mise env` * **Usage**: `mise env [FLAGS] [TOOL@VERSION]…` * **Aliases**: `e` * **Source code**: [`src/cli/env.rs`](https://github.com/jdx/mise/blob/main/src/cli/env.rs) Exports env vars to activate mise a single time Use this if you don't want to permanently install mise. It's not necessary to use this if you have `mise activate` in your shell rc file. ## Arguments ### `[TOOL@VERSION]…` Tool(s) to use ## Flags ### `-D --dotenv` Output in dotenv format ### `-J --json` Output in JSON format ### `-s --shell ` Shell type to generate environment variables for **Choices:** * `bash` * `elvish` * `fish` * `nu` * `xonsh` * `zsh` * `pwsh` ### `--json-extended` Output in JSON format with additional information (source, tool) ### `--redacted` Only show redacted environment variables ### `--values` Only show values of environment variables Examples: ``` eval "$(mise env -s bash)" eval "$(mise env -s zsh)" mise env -s fish | source execx($(mise env -s xonsh)) ``` --- --- url: /cli/exec.md --- # `mise exec` * **Usage**: `mise exec [FLAGS] [TOOL@VERSION]… [-- COMMAND]…` * **Aliases**: `x` * **Source code**: [`src/cli/exec.rs`](https://github.com/jdx/mise/blob/main/src/cli/exec.rs) Execute a command with tool(s) set use this to avoid modifying the shell session or running ad-hoc commands with mise tools set. Tools will be loaded from mise.toml, though they can be overridden with \ args Note that only the plugin specified will be overridden, so if a `mise.toml` file includes "node 20" but you run `mise exec python@3.11`; it will still load node@20. The "--" separates runtimes from the commands to pass along to the subprocess. ## Arguments ### `[TOOL@VERSION]…` Tool(s) to start e.g.: node@20 python@3.10 ### `[-- COMMAND]…` Command string to execute (same as --command) ## Flags ### `-c --command ` Command string to execute ### `-j --jobs ` Number of jobs to run in parallel \[default: 4] ### `--fresh-env` Bypass the environment cache and recompute the environment ### `--no-prepare` Skip automatic dependency preparation ### `--raw` Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1 Examples: ``` $ mise exec node@20 -- node ./app.js # launch app.js using node-20.x $ mise x node@20 -- node ./app.js # shorter alias # Specify command as a string: $ mise exec node@20 python@3.11 --command "node -v && python -V" # Run a command in a different directory: $ mise x -C /path/to/project node@20 -- node ./app.js ``` --- --- url: /cli/fmt.md --- # `mise fmt` * **Usage**: `mise fmt [FLAGS]` * **Source code**: [`src/cli/fmt.rs`](https://github.com/jdx/mise/blob/main/src/cli/fmt.rs) Formats mise.toml Sorts keys and cleans up whitespace in mise.toml ## Flags ### `-a --all` Format all files from the current directory ### `-c --check` Check if the configs are formatted, no formatting is done ### `-s --stdin` Read config from stdin and write its formatted version into stdout Examples: ``` mise fmt ``` --- --- url: /cli/generate/bootstrap.md --- # `mise generate bootstrap` * **Usage**: `mise generate bootstrap [FLAGS]` * **Source code**: [`src/cli/generate/bootstrap.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/bootstrap.rs) Generate a script to download+execute mise This is designed to be used in a project where contributors may not have mise installed. ## Flags ### `-l --localize` Sandboxes mise internal directories like MISE\_DATA\_DIR and MISE\_CACHE\_DIR into a `.mise` directory in the project This is necessary if users may use a different version of mise outside the project. ### `-V --version ` Specify mise version to fetch ### `-w --write ` instead of outputting the script to stdout, write to a file and make it executable ### `--localized-dir ` Directory to put localized data into **Default:** `.mise` Examples: ``` mise generate bootstrap >./bin/mise chmod +x ./bin/mise ./bin/mise install – automatically downloads mise to .mise if not already installed ``` --- --- url: /cli/generate/config.md --- # `mise generate config` * **Usage**: `mise generate config [-n --dry-run] [-t --tool-versions ] [PATH]` * **Source code**: [`src/cli/generate/config.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/config.rs) Generate a mise.toml file ## Arguments ### `[PATH]` Path to the config file to create ## Flags ### `-n --dry-run` Show what would be generated without writing to file ### `-t --tool-versions ` Path to a .tool-versions file to import tools from Examples: ``` mise edit # edit mise.toml interactively mise edit .mise.toml # edit a specific file mise edit -y # skip interactive editor mise edit -n # preview without writing ``` --- --- url: /cli/generate/devcontainer.md --- # `mise generate devcontainer` * **Usage**: `mise generate devcontainer [FLAGS]` * **Source code**: [`src/cli/generate/devcontainer.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/devcontainer.rs) Generate a devcontainer to execute mise ## Flags ### `-i --image ` The image to use for the devcontainer ### `-m --mount-mise-data` Bind the mise-data-volume to the devcontainer ### `-n --name ` The name of the devcontainer ### `-w --write` write to .devcontainer/devcontainer.json Examples: ``` mise generate devcontainer ``` --- --- url: /cli/generate/git-pre-commit.md --- # `mise generate git-pre-commit` * **Usage**: `mise generate git-pre-commit [FLAGS]` * **Aliases**: `pre-commit` * **Source code**: [`src/cli/generate/git_pre_commit.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/git_pre_commit.rs) Generate a git pre-commit hook This command generates a git pre-commit hook that runs a mise task like `mise run pre-commit` when you commit changes to your repository. Staged files are passed to the task as `STAGED`. For more advanced pre-commit functionality, see mise's sister project: ## Flags ### `-t --task ` The task to run when the pre-commit hook is triggered **Default:** `pre-commit` ### `-w --write` write to .git/hooks/pre-commit and make it executable ### `--hook ` Which hook to generate (saves to .git/hooks/$hook) **Default:** `pre-commit` Examples: ``` mise generate git-pre-commit --write --task=pre-commit git commit -m "feat: add new feature" # runs `mise run pre-commit` ``` --- --- url: /cli/generate/github-action.md --- # `mise generate github-action` * **Usage**: `mise generate github-action [FLAGS]` * **Source code**: [`src/cli/generate/github_action.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/github_action.rs) Generate a GitHub Action workflow file This command generates a GitHub Action workflow file that runs a mise task like `mise run ci` when you push changes to your repository. ## Flags ### `-t --task ` The task to run when the workflow is triggered **Default:** `ci` ### `-w --write` write to .github/workflows/$name.yml ### `--name ` the name of the workflow to generate **Default:** `ci` Examples: ``` mise generate github-action --write --task=ci git commit -m "feat: add new feature" git push # runs `mise run ci` on GitHub ``` --- --- url: /cli/generate/task-docs.md --- # `mise generate task-docs` * **Usage**: `mise generate task-docs [FLAGS]` * **Source code**: [`src/cli/generate/task_docs.rs`](https://github.com/jdx/mise/blob/main/src/cli/generate/task_docs.rs) Generate documentation for tasks in a project ## Flags ### `-i --inject` inserts the documentation into an existing file This will look for a special comment, ``, and replace it with the generated documentation. It will replace everything between the comment and the next comment, `` so it can be run multiple times on the same file to update the documentation. ### `-I --index` write only an index of tasks, intended for use with `--multi` ### `-m --multi` render each task as a separate document, requires `--output` to be a directory ### `-o --output ` writes the generated docs to a file/directory ### `-r --root ` root directory to search for tasks ### `-s --style