With the following project file settings:
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
<RuntimeIdentifier>osx-arm64</RuntimeIdentifier>
when publishing in release mode, I receive the following errors on my Mac M1 with .NET 9 preview 2, which I do not have with previous versions:
Restore complete (0,3s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
lib2 failed with errors (0,3s) → bin/release/net9.0/osx-arm64/lib2.dll
xcode-select : error : tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance [/Users/llt/Projects/dotnetoni/libs/lib2/lib2.csproj]
/Users/llt/.nuget/packages/microsoft.dotnet.ilcompiler/9.0.0-preview.2.24128.5/build/Microsoft.NETCore.Native.Unix.targets(243,24): error MSB4086: A numeric comparison was attempted on "$(_XcodeVersion)" that evaluates to "" instead of a number, in condition "'$(_XcodeVersion)' >= '15'". [/Users/llt/Projects/dotnetoni/libs/lib2/lib2.csproj]
Build failed with errors in 0,8s