Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File gets excluded every time the latest code is taken from TFS

Let's understand the problem:

For our ASP.NET project using Visual Studio 2013 premium on a Windows 7 x64

On developer A's machine:

  • We've got a TFS setup
  • We added a new file A in the project
  • We checked-in the newly created file in the TFS source control

On developer B's machine:

  • We've got the same TFS setup
  • We forcefully took the latest (by specific option - overwrite option) version
  • File A gets loaded in the project, however it stays excluded
  • Developer B manually includes the file in the project

The files are well included and that is our concern. Why files which're included are getting excluded on other devs' machines?

The newly added files gets loaded on dev B's machine however they doesn't show up in the solution tree. We've to manually include them in the project after show all files

There's only one mapping on each dev's machine. The code is going to locally mapped workspace only

We've a little big team, so for every developer. It happens every time we take the latest version.

How do we suppress this behaviour? Is there a setting as such?

We've tried searching the web, couldn't find a solution.

like image 768
xameeramir Avatar asked Aug 10 '16 12:08

xameeramir


1 Answers

It seems TFS automatically excluded the changes. You may encounter such a situation as below:

  • They're not loaded in your current solution, so Team Explorer assumes they're made as part of either a different solution and that you don't want to check them in together with the changes that do match the context you're in.
  • They're made in a different workspace, again Team explorer assumes you want to check in groups of files that logically make sense.

More detail info please refer the very detailed answer from jessehouwing in this question What are "Excluded Changes" in Team Foundation Server?

And if you are working with a little big team, the way you are using to "forcefully" take latest is not a recommend solution. Suggest you to still use get latest to download the files on the TFS server. Even though you may not obtain the "really latest version" of the file. You can still work on it and figure out the conflicts if there are during the check in action.

Update


If develop A has checked in the files, but not checked in the project file( .csproj file), then TFS will not download them if you execute a "Get Latest" by right clicking on the project or solution in Solution Explorer.

You will however get the files downloaded correctly if you right click and "Get Latest" on the folder in the source control window. But, they won't get loaded into your solution, because you haven't told TFS that they belong there.

like image 148
PatrickLu-MSFT Avatar answered Nov 20 '22 09:11

PatrickLu-MSFT