3

When I get latest version of any project in TFS, all the changes (mainly the packages) are going to detected changes. What should I do after seeing them? Promoting them goes to included changes in TFS and ignoring them gets them ignored while building the solution. Deleting them from disk deletes them completely.

What should I do for getting the latest version without all this complexity?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Vicky
  • 624
  • 2
  • 12
  • 35
  • Your exact question isn't really clear, but you should be excluding the packages folder from source control entirely via your `.tfignore` file. – Daniel Mann Jul 30 '17 at 21:17
  • So, when I get the latest version or get the entire project for the first time, that packages are showing as "ADD" in detected changes instead it should directly be downloaded as other files. But, the packages from the project are appearing in detected changes.I am not sure will this make sense. Also, I did not get what you meant to say excluding the packages folder from source control via .tfignore. How to do that and why? I have never done this before. – Vicky Jul 30 '17 at 21:40

1 Answers1

7

First you should understand what's the detected changes, and the difference between changes and detected changes.

While edits in a local workspace can be pended implicitly just by editing the file, adds and deletes still must be explicitly pended. However, TFS version control’s workspace scanner also detects new files which are ‘candidates’ for addition, and missing files and folders which are candidates for deletion. The Team Explorer’s Pending Changes Page has a link which shows the number of detected adds and deletes, and provides a link to the Promote Candidate Changes dialog which can be used to pend ‘real’ adds or deletes on these items. This is called “promoting” the candidate adds and/or deletes – because they become real pending changes.

Source Link: Server workspaces vs. local workspaces

In your case, you could just keep the detected changes. Since the most of the detected changes are packages folder, you could also follow Daniel's suggestion use tfignore file to ignore those files. As a result:

  • When you add ignored files to folders that are mapped in a local workspace, they do not appear in the Pending Changes page in Team Explorer.
  • When you try to add ignored files using the Add to Source Control dialog box (for example by dragging them into Source Control Explorer), they automatically appear in the Excluded items tab.

How to create a .tfignore file, you could follow my answer in this question: Visual Studio 2015 TFS .tfignore file

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 3
    Thank you. But keeping these changes in detected changes is making it more complex. Currently there are around 1000 detected changes due to packages. And, when some new changes get detected, it gets difficult to identify them. Any suggestions on that? – Vicky Jul 31 '17 at 20:45
  • Any luck here? Same issue for me :( – Idan Levi Nov 01 '18 at 07:18