user2220535
user2220535

Reputation: 43

How can I restrict "included changes" to a solution instead of to a workspace in TFS 2012?

Hi my team is currently working using TFS 2012 which tracks pending changes per workspace and not per project or solution. We have multiple solutions in our structure and any member of the team can work in any solution. So when we are going to do a "check in" on a specific solution we find that "included changes" lists all changes we have made in all the solutions we had worked on, instead (and this is what we want) the changes in the current solution only. How can we fix this?

Upvotes: 0

Views: 130

Answers (2)

Jason Williams
Jason Williams

Reputation: 57902

To add to @aclear16's answer:

Option 4: In the pending changes window, go to Included/Excluded Changes and click the "Show All" link. Choose "Custom Filter" and type (a unique part of) the root folder name of the project you want to focus on.

The best options are to use frequent checkins (2) as much as possible, and use my work to suspend and resume (3) when you are caught by the need to park some work-in-progress temporarily to deal with an urgent task or bug.

Upvotes: 0

Andrew Clear
Andrew Clear

Reputation: 8020

This is the expected behavior in TFS.

Option 1: Multiple workspaces. You can scope a workspace to a particular solution. So that each workspace only contains a single solution. Like C:\WS\Solution A, C:\WS\Solution B etc.

Option 2: Check in more often. Before switching to a new solution, check in any changes. This is the default industry best practice.

Option 3: Use shelvesets when switching to a new solution. If Option 2 isn't an option because you'd break the build if you checked in, you can use the suspend and resume feature to create a shelveset and clean your workspace. When you want to switch back to a previous solution, simply resume the shelveset and you're good to go. More about this can be found here: http://msdn.microsoft.com/en-us/library/ms181403.aspx

In all seriousness, option 2 is by far the best choice. No matter what method you choose, you should never, ever switch to a new solution with a dirty workspace.

Upvotes: 2

Related Questions