dotnet / format

Home for the dotnet-format command
MIT License
1.92k stars 174 forks source link

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

Closed fedele7008 closed 10 months ago

fedele7008 commented 10 months ago

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.

JoeRobich commented 10 months ago

@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.

fedele7008 commented 10 months ago

We forwarded issue on dotnet/sdk https://github.com/dotnet/sdk/issues/36434 because it seems like the issue is from dotnet tool restore command.