Easy Fix to Weird Pathing Problem

I just made a quick fix to a perplexing problem easily and quickly and thought I would share it.
For the second time in probably a year, I had a set of builds start failing after the developers changed path structures with the symptom that MSBUILD complains that a .CSPROJ file does not exist on the specified relative path. On investigation, the path is found to be exactly where it should be. I have had problems with path lengths in the past, checked both path lengths and found them to be less than 200, which should be fine. I ran across a Microsoft Reference to an known issue with MSBUILD where the combined length of the calling project and the relative path of the referenced project equal a specific number (259). Even though my quick NotePad++ line length count indicated I had not hit the magic number, I made a quick change in the VCS root by adding one character to the root(s) of the impacted builds. Sure enough - problem fixed.

My roots include checkout rules defined as:


so that multiple roots can maintain relative project reference structures.

I just changed the VCS root checkout rule to:

to solve the problem.
Total time to research: 2 hours.
Total time for fix: 5 minutes

Please sign in to leave a comment.