I'm trying to upgrade Xcode from 4.1 to 4.2. However App Store thinks that it's already up to date, which it is not.
I am a registered Mac and iOS developer. I don't think 4.2 is under NDA.
How can I fix this?
Delete the XCode installer in /Applications, restart App Store. Now you will have an "Install" button for XCode. Download the installer and run it.
Actually, chances are the installer is for Xcode 4.2. The App Store is a bit misleading, since it doesn't actually install Xcode, but downloads the installer and puts it in /Applications/Install Xcode.app. You still need to run the installer. The App Store knows nothing about if you've done that or not.