build.cmd fails on main due to IDE0055 formatting errors
build.cmd fails on main due to IDE0055 formatting errors
Repro
git clone https://github.com/dotnet/razor.git
cd razor
./restore.cmd
./build.cmd
Expected
Build succeeds without analyzer failures.
Actual
build.cmd promotes warnings to errors, so hundreds of IDE0055 (Fix formatting) diagnostics appear in
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces for the netstandard2.0, net8.0, and net9.0
target frameworks, causing the build to fail locally and in CI.
@ToddGrun - I'm guessing this is the issue we were looking at yesterday?
Weird, I run command line builds pretty regularly and haven't hit this, and our CI builds all run with WarningsAsErrors and are passing.
I have seen formatting errors in the IDE for the new C# extensions syntax, but I wouldn't have thought we had hundreds of them, nor many if any in Workspaces.
@StevenTCramer could you attach the full build log? I'm curious to see which files have issues. Maybe your git config is different, and our .gitattributes file is missing something. Perhaps even running build.cmd -bl and attaching the artifacts\log\Debug\Build.binlog file might be useful.
@davidwengier I only work on this on the weekends and with dotnet 10 coming out in a few days I probably won't even get to on this weekend. Getting this repo to build is non trivial. Last time I end up having to remove all my sdks and runtimes afterward.
But when I get back to it I will update this if you guys haven't solved it already.
@StevenTCramer as far as I'm aware you're the only person hitting this issue, so no stress from us if you don't have any more info. Just trying to unblock you :)