Ethan
Ethan

Reputation: 628

TFS file changes being included across team projects, and ignored files still shown as added

My TFS workspace has multiple team projects in it. Such as:

TeamProjectA
TeamProjectB
TeamProjectC

We are using TFS 2012. Lets say I have work going on all three of these at the same time. I want to check my changes in for TeamProjectA so I go to Team Explorer in Visual Studio (2012 or 2013) > Pending Changes, and the Included Changes section often has all modified files from each team project included, even though the team explorer is currently set to TeamProjectA. I always have to right click the parent solution folder of the solution for the team project I want to check in and then "Exclude Unselected". So thats my first problem. I know I am going to accidently include changes from other projects with my check-in at some point.

I also have some .dat files that are generated/overwritten during the build process and compiled into my dll. I want to exclude these files from source control, so I select them in Solution Explorer > File Menu > Source Control > Advanced > Exclude [file]. The glyph in Solution Explorer changes to a red circle with a black dash indicating it is excluded. When I go to Source Control Explorer, those files still show as an add though with the green + glyph. I even added an ignore.tfignore file with \*.dat but they still show up. How can I get these files to be ignored?

Thanks.

Upvotes: 2

Views: 1238

Answers (1)

Edward Thomson
Edward Thomson

Reputation: 78673

If you exclude a pending change, you still have that pending change, so it will still appear as "added". The difference between included and excluded is what will be checked in when you click the "Check In" button, but it will remain a pending change until you either undo it or check it in.

If you want these files to never be added in the first place, please make sure that your .tfignore lists them correctly. Please make sure that:

  1. You are using local workspaces.
  2. The file is called .tfignore and not ignore.tfignore.

Upvotes: 1

Related Questions