We're no longer using the separate dotnet-format tool since it is integrated into the dotnet SDK now.
With the move to the SDK the options changed a bit so we now need to use the `whitespace` format command so we can continue using the `--folder` option: https://github.com/dotnet/format/issues/1385
To run not just whitespace but code style formatters as well we'd need a workspace context (i.e. pass the .csproj to dotnet format), but inferring that from just the changed file list is hard.
1. Make downloading more robust by failing the download script if
there is a download error.
2. Map macOS and Ubuntu RIDs to RIDs that we know have versions to
download. This same logic is in the dotnet/jitutils bootstrap.sh script.
We don't want to upload versions for every RID since they are all
compatible. This makes the script robust to people running on new
releases.
3. Add more logging.
Invoke-WebRequest throws an exception when the download fails, so we
should use try-catch instead of status code to check failure. We can use
the generic Retry function from tools.ps1 to do this.
In addition pass -PassThru to avoid leaving a corrupted download file in
case the download fails. This will buffer the download and write it once
at the end.
Fix#57196