2

I've added a folder with asp.net core project which isn't supported by Visual Studio 2015 (which is used for everything else) and thus not included to the general solution. To have those files in source control I had to manually add them using "add items to folder" command in source explorer. So they are checked-in but tfs not tracking changes for them anymore although there are differences that are shown if compare to the latest folder on the server:

enter image description here

How do I make TFS track them and show pending changes for edited files?

mk_yo
  • 752
  • 1
  • 12
  • 39

2 Answers2

2

According to your description, looks like these files are all out side of Visual Studio.

Not sure if you are using server workspace or local workspace.

When adding or editing the workspace you click Advanced >> . There is a setting of Location: Local/Server.

For local workspace, when your script or anything else changes files outside Visual Studio, your workspace detects the changes automatically.

It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under Excluded Changes.

enter image description here

For server workspace, you could choose to use Reconcile command. See https://stackoverflow.com/a/22860674/932282 for a complete answer.

Besides, you could also take a look at other solutions in below similar question:

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    Reconcile with Checkout for files that do not have pending changes did the trick – mk_yo Nov 05 '19 at 08:25
  • there's still an issue when file is removed on local workspace. It's checked-out back from the server – mk_yo Nov 05 '19 at 09:00
  • @mk_yo Never get into this kind of situation. But guess you could give a try with Silvan's solution. https://stackoverflow.com/a/37164731/5391065 Which may do the trick. During the check out . Then choose "undo changes". After this you get a message "Confirm Undo Checkout". This message ONLY pops up for the files, which actually HAVE changed! Press "NO" for each files or "No to All". If not work, you could manually select these deleted files and not check them out as a workaround. – PatrickLu-MSFT Nov 05 '19 at 09:40
1

I think you just added them to source explorer and not to the solution, as you said. In this case, there is no editor application (even your VS) that is responsible for doing the check-out operation because they are not aware of TFS. On the other side, TFS can detect that changes have happened to the files but can not track them.
If you do not activate the "Get the latest version before check-out" option in your team project, then you can go to the source control and check-out those files manually and then check-in them manually again when your work with them is done.
Please before doing this, take a backup of your source code for caution.