Install Xcode 4.2 on OS X 10.8
No, you can't run Xcode 4.2 on OS X 10.8 (Mountain Lion).

Xcode 4.2 is available as a download from the developer site at Apple:



but it needs Lion.

On Mountain Lion, Xcode 4.2.x will show an error message similar to this, as mentioned here or here:

This installation of Xcode 4.2.x requires Mac OS X 10.7 Lion.


If you need Xcode 4.2 you will need to install Lion, preferably on an external harddrive to avoid overwriting your current Mountain Lion installation.