This is not a tutorial, it's more of a note so I'm going to remember how to do something the next time I stumble again on the problem.
Disclaimer: I'm not responsible if any of the following methods is going to delete any of your files. You really should make a backup before attempting it. Mostly your Xcode preferences should be kept, but it is not a guarantee.
[This method only works if you have a paid developer account.]
- Go to apple download page and login
- Click on more at the bottom
- Download the latest version of Xcode (that's not in beta)
- Make sure to delete the MacAppStore version of Xcode before updating it.
If you really want to use the MacAppStore, first ask yourself why. After that try these methods:
[This method didn't work for more, but worked for others]
- Turn on debug mode for Appstore. Open the Terminal and write <code>defaults write com.apple.appstore ShowDebugMenu -bool true</code>
- Relaunch Appstore
- From the Menu select: Debug → Reset Application.
[This method worked for me without deleting any preferences or add-ons]
- Delete code
- Quit the MacAppStore
- Restart your Mac
- Re-download Xcode ex-novo from the MacAppStore