error: Unable to resolve build file: XCBCore.BuildFile

error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference("3bf83096e50de72a94699e9afc1133ebe3512682230d04680075c283a974e273")) (in target 'MyTarget')

Xcode 10 is giving this error immediately when trying to build our project. It's not immediately clear what is causing it.

How can I resolve it?


For XCode 10 Beta: Problem occurs when I have two workspaces open that share the same project directories. Solution was

Short version

  1. Shut down all but one workspaces
  2. exit XCode and reopen XCode
  3. XCode > Product > Clean Build Folder

Longer version

  1. Shut down all but one workspace
  2. XCode > Preferences > Locations > Derived Data > goto directory ~/Library/Developer/Xcode/DerivedData
  3. Clear out subdirectories from DerivedData
  4. exit XCode and reopen XCode
  5. XCode > Product > Clean Build Folder

Thanks to @aferriss answer for the clue.


I came across this same error while using openframeworks 0.10 with xcode 10 recently. It seems like it was caused by having multiple openframeworks projects opened at a time. If you close them all one by one, and then reopen the one you'd like to work on, it should resolve the error. Hoping this is just an xcode-beta thing.

error message

Xcode used to tell you that there as a workspace integrity problem, and you could just ignore it. But it seems like it's returned. There's some discussion about this issue here.


For me, XCode > Product > Clean Build Folder and restart Xcode then worked.


This was the culprit for my experience of the same error: missing Command Line Tools setting

After setting the correct version of Command Line Tools (i.e., Xcode 10.2.1; see below) on my system, the error went away!

correct Command Line Tools setting


Just Restarted my Xcode and the problem went away