Has automatic checkout stopped working for you in Visual Studio?

This has happened to me twice on my current project; the last time it was passed from me to two other people in the team like the common cold. 

Although I’m hoping to steer this blog from a “To do X perform these steps” snoozefest into a more meta-ish discussion of software development, I record the solution here for the benefit of super annoyed developers everywhere.

Problem:  Automatic checkout on edit in Visual Studio has stopped working.

Possible causes:  Visual Studio crashes; project files are corrupted in source control by these crashes.

Always check first:  Tools -> Options -> Source Control -> Environment -> Editing: -> Check out automatically

Ready?  Put on your grass skirt, grab your totem, snort some yopo and do the following:

  1. Check in everything
  2. Close visual studio
  3. Make sure every file is set to read only in the solution directory (set it on the root solution folder and configure it to propagate to children)
  4. Search for all files under the root projet directory *.user and *.vssscc and delete them (this might be overkill; one or the other may be the culprit but deleting both types won’t hurt you)
  5. Open VS and load the solution
  6. Check everything back out and then check everything back in

Some of these steps may be cargo-cultish, but the problem is so nebulous its not for us to fully understand the meaning, but to mindlessly repeat the rituals so the source control gods will once again be in their good graces.  Step 4 is definitely required; the others may be unnecessary.  I’d test it but I hate when this bug happens; its like a paper cut in between your fingers.  Not anything to stop you from functioning, but damnably annoying.