Description
Publishing AOT artifacts on macOS arm64 fails on .NET 11 RC1 with xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance.
The same app/environment works when changing only TargetFramework from net11.0 to net10.0.
This may be related to #100189, but this report is for .NET 11 behavior.
Reproduction Steps
dotnet new console -n aot-publish-test
The template "Console App" was created successfully.
Processing post-creation actions...
Restoring /Users/weihan.li/test/aot-publish-test/aot-publish-test.csproj:
Restore succeeded.
cd ./aot-publish-test/ && cat ./aot-publish-test.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net11.0</TargetFramework>
<RootNamespace>aot_publish_test</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
dotnet publish -p PublishAot=true
Restore complete (1.4s)
info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
aot-publish-test net11.0 osx-arm64 succeeded (2.8s) → bin/Release/net11.0/osx-arm64/publish/
xcode-select : error tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Build failed with 1 error(s) in 4.5s
Expected behavior
Publish should success
Actual behavior
Publish fails with:
xcode-select : error tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Regression?
Change only TargetFramework to net10.0 and run the same publish command; publish succeeds.
Works when updating target framework to net10.0 and with .NET 10 SDK
dotnet publish -p PublishAot=true
Restore complete (0.1s)
info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
aot-publish-test net10.0 osx-arm64 succeeded (2.0s) → bin/Release/net10.0/osx-arm64/publish/
Build succeeded in 2.1s
Known Workarounds
No response
Configuration
.NET SDK:
Version: 11.0.100-rc.1.26425.128
Commit: 3551975be0
Workload version: 11.0.100-manifests.a6e318ce
MSBuild version: 18.11.0-1.26425.128+3551975be
Runtime Environment:
OS Name: Mac OS X
OS Version: 26.6
OS Platform: Darwin
RID: osx-arm64
Base Path: /Users/weihan.li/Library/Application Support/dotnet/sdk/11.0.100-rc.1.26425.128
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 11.0.0-rc.1.26425.128
Architecture: arm64
Commit: 3551975be0
.NET SDKs installed:
10.0.401
11.0.100-rc.1.26425.128
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.12
Microsoft.AspNetCore.App 11.0.0-rc.1.26425.128
Microsoft.NETCore.App 10.0.12
Microsoft.NETCore.App 11.0.0-rc.1.26425.128
Environment variables:
DOTNET_ROOT=/Users/weihan.li/Library/Application Support/dotnet
Other information
Possibly related to closed issue #100189 (xcode-select : error : tool 'xcodebuild' requires Xcode - new error with nativeaot in .NET 9 preview 2).
sdk issue created before: dotnet/sdk#55296
Description
Publishing AOT artifacts on macOS arm64 fails on .NET 11 RC1 with
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance.The same app/environment works when changing only
TargetFrameworkfromnet11.0tonet10.0.This may be related to #100189, but this report is for .NET 11 behavior.
Reproduction Steps
Expected behavior
Publish should success
Actual behavior
Publish fails with:
Regression?
Change only
TargetFrameworktonet10.0and run the same publish command; publish succeeds.Works when updating target framework to net10.0 and with .NET 10 SDK
Known Workarounds
No response
Configuration
Other information
Possibly related to closed issue #100189 (
xcode-select : error : tool 'xcodebuild' requires Xcode - new error with nativeaot in .NET 9 preview 2).sdk issue created before: dotnet/sdk#55296