I came across a curious problem a couple of days ago. Visual Studio greeted me with a “Value does not fall within the expected range” when trying to open some of the configuration and text files in one of my solutions.
This occurred even if I closed the solution and tried to open the individual files. ProcessMonitor.exe revealed nothing. Disabling plugins didn’t help. Deleting .suo and .user files didn’t help.
Googling for a solution revealed a couple of patterns. People were getting this either in VB.NET Windows Forms projects, profiling C++ applications or trying to open TFS work items. The latter resonated. TFS, my long-time nemesis, we meet in battle again.
I tried removing the local path mapping for the project in my TFS workspace, deleted the folder and recreated the mapping. Win.

