Wednesday, July 9, 2014

Check-in and undo pending changes when having several Visual Studio solutions in the same folder could have side effects

In my current project we have a number of Visual Studio projects distributed into several solutions. In our case all solutions files are located in the same (root) folder.

Now, if I choose to check in pending changes at the solution level in one solution, the included changes will unexpectedly include changes for all solutions in the root folder.

Similarly, and even worse, if I choose to undo the pending changes at the solution level in one solution, the list of changes to be undone will actually include changes made to the other solutions as well.

The risk of checking in changes from other solutions by mistake, can be mitigated easily by selecting the View Option: Show Solution Changes:




However, there seems to be not similar easy way to avoid undoing pending changes in other solutions when undoing pending changes in one solution. Instead I sort by folder name and exclude the changes I want to keep one by one: