Seems like this should be something very simple, but I can't find how to do this...
I made a changes to several files spread within a repo by using a script that I wrote. Problem is TFS in its infinite wisdom does not think the files have changed. Aside from manually finding each file and clicking "checkout for editing" is there any way to tell TFS to just rescan everything and detect changes?
In the team explorer open up the source control tab, then right click on the route folder and select Check in Pending Changes. This will check in all the files over all the solutions/projects that you have underneath the root. Repeat the process for any other team collections you have used.
To undo a few of your pending changes To undo all changes you have made in your solution or a code project, open the context menu, and then choose Undo Pending Change. In the Undo Pending Changes dialog box, make sure the changes you want to undo are selected, and then choose Undo Changes.
A Folder Compare (File->Source Control->Compare...) should do the trick. Select the top folder from where to start comparison, and select to compare with Latest Version. The result hould show files that are changed, and whether they are checked out or not.
TFS has a "Reconcile" command for this. See https://stackoverflow.com/a/22860674/932282 for a complete answer.
You need to work with a local Workspace
. Here's how to manage workspaces:
visualstudio.com: "Create and work with workspaces".
When adding or editing the workspace you click Advanced >>
. Then you set Location:
to Local
.
Now 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
BUT BE CAREFUL. When adds
or deletes
get detected and you add them to your Pending Changes
, the files aren't automatically included to your project. So you maybe check them in to TFS
, but they aren't listed under the Solution Explorer
.
Matt Burke has a fix for that problem:
mattburkdev.com: "Automatically Include All Files in Folder in Visual Studio"
To edit the Project file you rightclick your project, chosse Unload Project
, then rightclick on it again and choose Edit
. After you edited the project files save and close it. Then rightclick and chose Load Project
.
But with that you also need to be careful, because the Project only searches for new files in these folders to include, when you load the project and not while you have the project open. So when some files get added outside Visual Studio, you just reload the project.
But if you have to stick to a Server Workspace for some reason i got another trick for you:
FIRST: Check out all Files that maybe have pending changes (better check out many files). Then go to Team Explorer -> Pending Changes and choose all files you just checked 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".
FINALLY: Under pending changes all files get removed from the list except the ones which have pending changes.
I hope I could help someone and you didn't have to search for this solution as long as I had to ^^
If any of your changes occured when you were offline, you can go to File > Source Control > Go Online, and all files will be checked for modification.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With