After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project:
Cannot find cdtool at \'/Applications/Xcode.app/Contents/Developer/
Didn't work for me because I also have a Watch app and got the error on the Watch SDK.
I ended up deleting both Xcode 8 and 9 Beta, deleting /Library/Developer and ~/Library/Developer. Then reinstalled Xcode 8 and it worked.
/Library/Developer
~/Library/Developer