Endless spinner when trying to update Xcode in App Store I'm trying to update Xcode on my Mac mini.

When I click the Update button in the App Store, a spinner appears, but nothing else happens.  



I have seen this before, and I think that possibly upgrading of the App Store fixed it.  There's no App Store update this time.  

I am trying an OS upgrade to EL Capitan.  Is there anything else I should check?
Here's what I had to do


Upgrade OS X to the latest


This stopped the eternal spinner - instead the spinner showed for a second, then nothing happened
In the past, updating the App Store itself helped

Go to the Updates tab and click UPDATE ALL


App Store asked me for my credentials then ran all upgrades, including Xcode