Vicky
Vicky

Reputation: 734

Detected changes in TFS getting all the files

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?

Upvotes: 3

Views: 3528

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

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

Upvotes: 7

Related Questions