dotnet / dotnet/sdk

dotnet format (latest 8) intermittently fails with "Unable to locate dotnet CLI. Ensure that it is on the PATH."

Open
#44,957 5 comments 9 reactions 0 assignees View on GitHub
Area-External Area-Format untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

Initially opened over at https://github.com/dotnet/format/issues/2218 (forgot that it was moved...)

This started happening to our Github builds this weekend:

![Image](https://github.com/user-attachments/assets/71594be1-9b3b-4a69-bae9-ca1504020991)

We never had any issues whatsoever, so initially we were looking at the newly installed net90, but then found https://github.com/microsoft/azure-pipelines-tasks/issues/19162 (and by extension https://github.com/dotnet/format/pull/2000). However, when locking to the latest version in https://github.com/icsharpcode/ILSpy/pull/3338/files we still see "Unable to locate dotnet CLI. Ensure that it is on the PATH.".

So it wasn't the old-ish version of dotnet-format that tripped us up but it happens also with the latest 8-series one. Any ideas/pointers where to start looking next? This flakiness is annoying (but not a showstopper atm).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.