after mounting a volume with a bad os installation, i have had xcode disappear twice. the first time i just reinstalled it, but this is the second time. why is this happening and how can i stop it in the future?
xcode disappears
forgot to give details: mid 2010 imac, the previous drive had yosemite on it, then installed el capitan and the install wouldn't go through, so to make an extremely long story short, got a new drive and installed el capitan on that one. i have data on the other drive i need, so i can't just forget about it. current install seems to be working fine. i used xcode between mountings of the bad drive, but i'd open a project and work on it, then try to unmount the drive. it would say it's in use by something, but didn't specify. then i'd force eject and xcode is now gone from my good hard drive. happened twice. this is the third time i'm installing xcode on this drive, having had it disappear on me twice under similar circumstances.
so, for some reason, apple decided to put xcode into a /Volumes/Macintosh HD/Applications/, where Macintosh HD isn't a volume, but a folder, instead of on the drive I installed the OS onto. so when the other drive (called Macintosh HD) mounts it must delete that folder.
Is 'other drive' your current boot drive or not?
What happens if you abandon the MAS install scheme and manually download via https://developer.apple.com/downloads/
...then mount that image and drag Xcode to your choice of location?