xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.45k stars 511 forks source link

VS Mac 17.3.7 (build 11) fails to run on iOS 16.0.3 #16320

Closed dannyatger closed 1 year ago

dannyatger commented 1 year ago

Steps to Reproduce

  1. Create new, simple Xamarin Forms project
  2. Select iOS target against iPhone with iOS 16 (I have iPhone 12 with iOS 16.0.3)
  3. Press Run.

VS 2022 is configured to run against Xcode 14.0.1 (Xcode 13.4 still works fine).

Expected Behavior

Build and launch Xamarin Forms app.

Actual Behavior

It builds OK but when it tries to deploy and run on iOS, reports:

/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch -sdkroot "/Applications/Xcode.app/Contents/Developer" --installdev "/Users/dannykumamoto/Projects/test1013/test1013/test1013.iOS/bin/iPhone/Debug/device-builds/iphone13.2-16.0.3/test1013.iOS.app" --device ios "--devname=GER Danny iPhone12" --install-progress error HE0004: Could not load the framework 'DVTITunesSoftwareServiceFoundation' (path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation): dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation, 0x0001): Library not loaded: '@rpath/ContentDelivery.framework/Versions/A/ContentDelivery' Referenced from: '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/DVTITunesSoftwareServiceFoundation' Reason: tried: '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.10.0.5/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.10.0.5/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/System/Library/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file)

Application could not be uploaded to the device.

Environment

Version information ``` Visual Studio Enterprise 2022 for Mac Version 17.3.7 (build 11) Installation UUID: be260a79-421d-4ca5-8c40-fe5a978a47dc Runtime .NET 6.0.5 (64-bit) Architecture: Arm64 Roslyn (Language Service) 4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608 NuGet Version: 6.2.2.1 .NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/6.0.402/Sdks SDK Versions: 6.0.402 6.0.401 6.0.400 6.0.400-preview.22330.6 6.0.302 6.0.300 6.0.203 6.0.202 6.0.201 6.0.200 6.0.101 MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET SDK (x64) SDK Versions: 6.0.402 6.0.401 6.0.400 6.0.400-preview.22330.6 6.0.302 6.0.300 6.0.202 6.0.201 6.0.106 6.0.105 6.0.103 6.0.102 6.0.101 5.0.408 5.0.407 5.0.406 5.0.405 5.0.404 3.1.424 3.1.423 3.1.422 3.1.421 3.1.420 3.1.419 3.1.418 3.1.417 3.1.416 .NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 .NET Runtime (x64) Runtime: /usr/local/share/dotnet/x64/dotnet Runtime Versions: 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 5.0.17 5.0.16 5.0.15 5.0.14 5.0.13 3.1.30 3.1.29 3.1.28 3.1.27 3.1.26 3.1.25 3.1.24 3.1.23 3.1.22 Xamarin.Profiler Version: 1.8.0.22 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode 14.0.1 (21336) Build 14A400 Xamarin.Mac Version: 8.10.0.5 (Visual Studio Enterprise) Hash: 96b3edb6d Branch: d17-2 Build date: 2022-05-18 07:32:06-0400 Xamarin.iOS Version: 15.10.0.5 (Visual Studio Enterprise) Hash: 96b3edb6d Branch: d17-2 Build date: 2022-05-18 07:32:07-0400 Xamarin Designer Version: 17.3.0.208 Hash: 0de472ea0 Branch: remotes/origin/d17-3 Build date: 2022-10-05 17:22:59 UTC Xamarin.Android Version: 12.2.8.3 (Visual Studio Enterprise) Commit: xamarin-android/d17-1/fafdba7 Android SDK: /Users/dannykumamoto/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 4.4 (API level 19) 12.0.99 (API level 32) 11.0 (API level 30) SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 33.0.2 SDK Build Tools Version: 33.0.0 Build Information: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-1@7ac33610 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.37.1@0893b3b Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-1@db125a7 Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.3.0.23 Hash: 965bf40 Branch: remotes/origin/d17-3 Build date: 2022-10-05 17:23:04 UTC Android Device Manager Version: 0.0.0.1169 Hash: fafb1d5 Branch: fafb1d5 Build date: 2022-10-05 17:23:04 UTC Build Information Release ID: 1703070011 Git revision: b625496a1b9780a50e1935e641beecf8979c795b Build date: 2022-10-05 17:21:01+00 Build branch: release-17.3 Build lane: release-17.3 Operating System Mac OS X 12.6.0 Darwin 21.6.0 Darwin Kernel Version 21.6.0 Mon Aug 22 20:20:05 PDT 2022 root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64 ```

Build Logs

msbuild.binlog.zip

Example Project (If Possible)

AntonKosenkoDX commented 1 year ago

Experienced the same issue with MAUI.

dalexsoto commented 1 year ago

@dannyatger according to your version information you are using

Xamarin.iOS
Version: 15.10.0.5 (Visual Studio Enterprise)

Which only supports Xcode 13.x series, if you want to use Xcode 14 you need to install Xamarin.iOS 16. Please go to your updater and switch to the stable channel and let it install Xamarin.iOS 16.


@AntonKosenkoDX if you are on windows you need to install the latest stable version of VS 17.3.6, if you are on VSMac you will need to update your workloads to the latest stable version by doing botnet workload update hope this helps!

Thank you!