MSBuild with .Net 9 shipped a feature called BuildCheck. A simple dotnet build -check could demo what it's capable of. See https://github.com/dotnet/msbuild/blob/main/documentation/specs/BuildCheck/Codes.md
dotnet build -check