dotnet / format

Home for the dotnet-format command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure pipeline fail running dotnet-format when newer version is available

fedele7008 opened this issue · comments

We are running dotnet tool restore to download dotnet-format version '8.0.452306'

But it fails when trying to run dotnet-format

run dotnet tool restore

Screenshot 2023-10-23 at 6 11 11 PM

run dotnet tool run dotnet-format

Screenshot 2023-10-23 at 6 12 56 PM
This error shouldn't occur since we just restored it.

It always works on the latest version (at the time of filing this issue '8.0.452310') but it seems to failing on older versions.

@fedele7008 What .NET SDK are you building against? If it is .NET 6+, I would recommend using the dotnet CLI directly as format ships in the SDK now. You would use dotnet format instead of dotnet-format.

We forwarded issue on dotnet/sdk dotnet/sdk#36434 because it seems like the issue is from dotnet tool restore command.