Skip to content

dotnet format is failing on CI #4045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jamescrosswell opened this issue Mar 19, 2025 · 1 comment · Fixed by #4054
Closed

dotnet format is failing on CI #4045

jamescrosswell opened this issue Mar 19, 2025 · 1 comment · Fixed by #4054

Comments

@jamescrosswell
Copy link
Collaborator

The Format workflow in CI is currently breaking with:
System.Exception: source text did not have an identifiable encoding

Example here

Seemingly there is an issue with dotnet format and LF line endings (vs CRLF line endings). The command runs fine on Windows.

Probably the simplest workaround is to run this workflow on the windows-latest runner (instead of macos-15).

@jamescrosswell
Copy link
Collaborator Author

It looks like this will be fixed in the 9.0.202 SDK release, once this is available.

For the time being, I've disabled rollForward behaviour in our global.json (which effectively pins the version of dotnet-format to the version that shipped with version 9.0.103 of the .NET SDK). See commit 33cea55 (this was done so that we could finally merge that PR).

Once 9.0.202 is available we can bump this... we could potentially consider enabling rollForward again but that does make our CI builds less deterministic. I'm included to leave it disabled and only bump the SDK version intentionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant