See https://developercommunity.visualstudio.com/t/VS-2026-fails-to-build-net-10-web-app/11011933 (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2654293).
Roslyn build tasks use DOTNET_HOST_PATH variable set by MSBuild, I assume other tasks might do that too. If that variable is overwritten by the user from the outside to a directory path (instead of a file path), this leads to unhelpful errors, so it might be nice if MSBuild warned about that to help users determine the root cause.