When building runtime in my local Macbook Pro with build.sh -rc Release today, I got this failure:
xcode-select : error : tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance [/Users/carlos/repos/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj]
/Users/carlos/repos/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj(79,24): error MSB4086: A numeric comparison was attempted on "$(_XcodeVersion)" that evaluates to "" instead of a number, in condition "'$(_XcodeVersion)' >= '15'".
It came from here:
https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj#L79
Root cause was that the Xcode -> Preferences -> Location -> Command Line Tools dropdown was set to No Xcode selected. So I had to manually select the single only option in the dropdown and now the local build succeeded. It's explained here:
https://stackoverflow.com/a/72115137
The top error comes from Xcode itself, but that message wasn't helpful. But we could kind of address this from our side: