One more time about TFS

Every day when I open my solution in Visual Studio I get this message box:

After that Visual Studio checks out my solution file and a number of project files, does not change a thing in them, and the next time I open the solution I am told the same story again. It does not matter whether I undo changes or check them in – the project files on disk are identical to those in source control anyway.

Today I have finally got to investigate what is wrong with my solution. It turns out that I committed a thought-crime of putting some of the projects in a different directory tree. Well, it was actually not me who did that, but it does not matter. In a nutshell, I have the following directory tree


It looks like when I open the solution, Visual Studio notices that it lives in Root\Solution, while projects ProjA and ProjB live in Root\Stuff. This is not allowed and must be fixed immediately. So, it checks out the solution file and project files for ProjA and ProjB. Then it realizes there is really nothing it can do and does not change the files. It leaves ProjC alone, since it is a law-abiding citizen sitting in its proper cell.

Source control bindings in Visual Studio always were a nightmare, and after 10 years they still can’t get it right. The funny thing about this situation is that all other source control operations work just fine – I can check out and check in files in all projects, compare for differences, and the like. But Visual Studio will still nag me every time I open the solution, because I have violated THE LAW and had an audacity to use projects from another directory tree.

In other words, they can handle it perfectly, but they still complain, in some indirect form, that I don’t follow the rules and insist on pointlessly checking out my files. Not cool.

Leave a Reply

Your email address will not be published. Required fields are marked *