Build error MT0057 for .net Maui iOS, Mac Catalyst builds with no problem********-**************'%2FLibrary%2FDeveloper%2FCommandLineTools'********-************%20--stdout%20%2Fdev%2Fttys000%20--stderr%20%2Fdev%2Fttys000%20--wait-for-exit%22%20exited%20with%20code%201.%20%5B%2FUsers%2Fchris%2FDocuments%2FDevelopment%2FMyApp%2Fsrc%2FMyApp%2FMyApp.csproj%5D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIt%20is%20odd%20that%20it%20can%20find%20XCode%20for%20Catalyst%20but%20cannot%20find%20it%20for%20iOS.%20Any%20help%20would%20be%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3297260%22%20slang%3D%22en-US%22%3E
New Contributor

I can build and run for Mac Catalyst fine with this command

dotnet build -t:Run -f net6.0-maccatalyst MyApp.csproj

but when I try to build for iOS using this command

dotnet build -t:Run -f net6.0-ios -p:_DeviceName=:v2:udid=********-************** MyApp.csproj

I get this error

EXEC : error MT0057: Cannot determine the path to from the sdk root '/Library/Developer/CommandLineTools'. Please specify the full path to the bundle. [/Users/chris/Documents/Development/MyApp/src/MyApp/MyApp.csproj]
/usr/local/share/dotnet/sdk/6.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(897,5): error MSB3073: The command "/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.2.302-preview.14.122/tools/bin/mlaunch --launchsim bin/Debug/net6.0-ios/iossimulator-x64/ --device :v2:udid=********-************ --stdout /dev/ttys000 --stderr /dev/ttys000 --wait-for-exit" exited with code 1. [/Users/chris/Documents/Development/MyApp/src/MyApp/MyApp.csproj]

It is odd that it can find XCode for Catalyst but cannot find it for iOS. Any help would be appreciated.

2 Replies

Hi @chrismg32,

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang

best response confirmed by chrismg32 (New Contributor)

@LanHuangThanks. I got an answer.

Xcode > Preferences > Locations > Command Line Tools did not have a value selected. Odd that is works for catalyst but not iOS but making sure the above tool has a value selected solved my problem.