Jimmy
Jimmy

Reputation: 2951

.net maui clang++ exited with code 1 ld:framework not found system

I recently updated to the latest macos and xcode (14.3) and it's broke my .net build on ios (for the second time). I've made sure to set the SDK location in Visual Preferences > SDK Locations > Apple and confirmed this in the terminal xcode-select -p

Finally, I've tried creating a new maui project, which works, so I've incrementally added all the libraries the not-working project uses and it still works... WHY

I just keep getting the error:

clang++ exited with code 1:
ld:framework not found System
clang: error: linker command failed with exit code 1

Upvotes: 5

Views: 9081

Answers (2)

Jimmy
Jimmy

Reputation: 2951

Adding Microsoft.Identity.Client.Extensions.Msal fixed it.

EVEN THOUGH I WASN'T USING THE LIBRARY??

Upvotes: 7

Alexandar May - MSFT
Alexandar May - MSFT

Reputation: 10088

To begin with, according to [META] Xcode 14.3 Support for Xamarin, .NET 6/7 and MAUI #17561, Xcode 14.3 is not supported, and it is recommended that you use Xcode 14.2 for now. If you have updated to Xcode 14.3 and want to go back to Xcode 14.2 you can download Xcode 14.2 from the downloads page in the Apple Developer Portal.

In addition, the error below means that it's related to Xcode command line tools.

clang++ exited with code 1:
ld:framework not found System
clang: error: linker command failed with exit code 1

You may open Xcode and go to Xcode->Preferences->Location->Command Line Tools and then select a different one.

Hopefully this clears that up a little bit.

Upvotes: 2

Related Questions