5

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.

Community
  • 1
  • 1
Zameer Ansari
  • 28,977
  • 24
  • 140
  • 219

1 Answers1

5

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.

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    The files are well included and that is our concern. Why files which're included are getting excluded on other devs' machines? – Zameer Ansari Aug 11 '16 at 08:18
  • How did you actually achieve the "forcefully took the latest "? Moreover, if Developer B use the normal get latest ,did the files download from TFS still auto excluded? – PatrickLu-MSFT Aug 11 '16 at 08:33
  • Yes, 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. I've updated question – Zameer Ansari Aug 11 '16 at 08:52
  • Did the machine B have configured a correct workspace mapping? And get the new added file in the tfs mapped local workspace. According to your description, seems there are something wrong with the mappings. – PatrickLu-MSFT Aug 11 '16 at 09:08
  • There's only one mapping on each dev's machine. The code is going to locally mapped workspace only – Zameer Ansari Aug 11 '16 at 10:15
  • I think I figured out the problem. Did you have not check in the project file? If develop A has checked in the files, but **not checked in the project 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**. Please see my update answer. – PatrickLu-MSFT Aug 11 '16 at 15:29