Skip to content

[net6] Infer Xcode without VSMac being installed #11172

Open
@Redth

Description

@Redth

Originally posted in dotnet/maui-samples#126


I have multiple Xcode versions installed:

-rw-r--r--@  1 alklig  admin  836 Feb  8 15:06 Xcode
lrwxr-xr-x   1 root    admin   28 Feb  8 15:08 Xcode.app -> /Applications/Xcode_12.4.app
drwxr-xr-x   3 alklig  staff   96 Jun  4  2018 Xcode94.app
drwxr-xr-x   3 alklig  staff   96 Oct  8  2020 Xcode_12.1.app
drwxr-xr-x   4 alklig  staff  128 Feb  8 15:07 Xcode_12.4.app

dotnet build HelloiOS produces

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/14.4.100-ci.main.1192/tools/msbuild/iOS/Xamarin.Shared.targets(891,3): error : Could not find a valid Xcode app bundle at '/Applications/Xcode_12.3.app'. Please update your Apple SDK location in Visual Studio's preferences (Projects > SDK Locations > Apple > Apple SDK). [/Users/alklig/work/net6-mobile-samples/HelloiOS/HelloiOS.csproj]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/14.4.100-ci.main.1192/tools/msbuild/iOS/Xamarin.Shared.targets(891,3): error :          [/Users/alklig/work/net6-mobile-samples/HelloiOS/HelloiOS.csproj]

Build FAILED.

because in VS for Mac I had the Apple SDK setting pointing to /Applications/Xcode_12.3.app (which I deleted).

the CLI builds should use the result of xcode-select -p for the SDK, not the VS for Mac setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetAn issue or pull request related to .NET (6)dotnet-pri3.NET 6: wishlist for stable release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions