jdx/mise · error
dotnet SDK was not found in `dotnet --list-sdks` output
Error message
dotnet SDK {} was not found in `dotnet --list-sdks` output:
{} What it means
After installing a dotnet SDK, mise verifies it by running `dotnet --list-sdks`. This bail fires when the freshly installed version does not appear in that output, meaning the installation did not actually land as expected.
Solutions
- Re-run `dotnet --list-sdks` manually and compare with the requested version
- Clear the dotnet install cache and retry (`mise cache clear dotnet` or remove ~/.local/share/mise/installs/dotnet/<version>)
- Check DOTNET_ROOT and DOTNET_MULTILEVEL_LOOKUP env vars are not pointing elsewhere
- Retry the install to rule out a truncated download
Example fix
// before export DOTNET_ROOT=/usr/lib/dotnet # stale path mise install dotnet@8.0.100 // after unset DOTNET_ROOT mise install dotnet@8.0.100
Defensive patterns
Strategy: validation
Validate before calling
dotnet --list-sdks | grep -q "^8.0.100" || echo "SDK missing"
Type guard
null
Try / catch
catch (e) {
if (/was not found in `dotnet --list-sdks`/.test(String(e))) {
// clear cache, unset DOTNET_ROOT, reinstall
}
} Prevention
- Keep DOTNET_ROOT/DOTNET_MULTILEVEL_LOOKUP unset or correct in mise-managed environments
- Verify disk space before large SDK installs
- Run `dotnet --list-sdks` after install in CI as a smoke test
- Reinstall on verification failure instead of proceeding
When it happens
Trigger: `mise install dotnet@<version>` where the post-install verification via `dotnet --list-sdks` does not list the requested version, e.g. partial download, wrong install directory, or a dotnet shim resolving to a different SDK root.
Common situations: Corrupt or truncated SDK downloads; DOTNET_ROOT / PATH conflicts pointing dotnet at another installation; disk-full installs; older dotnet output formats or the SDK installing but the runtime shim not registered.
Related errors
- the packslip is for , not
- 's bin/install exited successfully but installed nothing…
- : API metadata has no tap_git_head
- is not a mise bin. Perhaps you need to install it first.
- brew-cask: command wrapper
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/edca07378d53721c.
Report an issue: GitHub.
Appendix: source
Thrown at src/plugins/core/dotnet.rs:91
return Ok(());
}
ctx.pr.set_message("dotnet --list-sdks".into());
let sdks = CmdLineRunner::new(DOTNET_BIN)
.with_pr(ctx.pr.as_ref())
.arg("--list-sdks")
.env_values(tv.install_env())
.envs(self.exec_env(&ctx.config, &ctx.ts, tv).await?)
.prepend_path(self.list_bin_paths(&ctx.config, tv).await?)?
.read()
.await?
.lines()
.map(str::to_string)
.collect::<Vec<_>>();
if sdk_list_contains_version(&sdks, &tv.version) {
Ok(())
} else {
eyre::bail!(
"dotnet SDK {} was not found in `dotnet --list-sdks` output:\n{}",
tv.version,
sdk_list_display(&sdks)
)
}
}
}
#[async_trait]
impl Backend for DotnetPlugin {
fn ba(&self) -> &Arc<BackendArg> {
&self.ba
}
fn supports_lockfile_url(&self) -> bool {
false
}
View on GitHub (pinned to 533346cc37)