Bug 46546 - xcode-select: error: tool 'xcodebuild' requires Xcode
Summary: xcode-select: error: tool 'xcodebuild' requires Xcode
Status: NEW
Alias: None
Product: Objective Sharpie
Classification: Desktop
Component: General ()
Version: 3.3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
Depends on:
Reported: 2016-11-07 19:43 UTC by RobertN
Modified: 2016-11-07 19:43 UTC (History)
0 users

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 46546 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description RobertN 2016-11-07 19:43:10 UTC
This is more troubleshooting vs. an issue, but maybe sharpie could handle the "'xcodebuild' requires Xcode" error message better....

If you have multiple copies of Xcode installed and none are actually named `Xcode.app` and you have not run `xcode-select -switch ...` from the cmd line yet (i.e. our macOS CI build VMs, new employee installs from images, etc...)

>sharpie pod bind
   xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer  
   /CommandLineTools' is a command line tools instance
   error: xcodebuild did not run successfully (exit code: 1)

Renaming one back to `Xcode.app`, then run:

   sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

After that, if you rename that Xocde.app to something else and run `sharpie` the error message display from `xcrun` makes sense:

>sharpie pod bind
   xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select 
   --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man
   error: xcodebuild did not run successfully (exit code: 1)