SeReGa
SeReGa

Reputation: 1317

Visual Studio - How to search in pending changes files?

I've made plenty of changes in my solution, using TFS, and I want to search for something only in the files which I edited (which appear in the "Pending Changes").

There is only an option to search in specific directories of the solution but not in the edited files.

Maybe there is some extension that can help with it?

For example, I want to search for TODO comments but only in the files edited by me, without seeing TODOs of other developers.

Upvotes: 6

Views: 2186

Answers (5)

Antonio Leite
Antonio Leite

Reputation: 480

Not the exact answer for this question but go to View/Task List to search for the TODO Apply the technics explained in the other answers. To get a list of tokens, go to Tools/Options/Environment/TaskList

Upvotes: 0

Guy Frieman
Guy Frieman

Reputation: 166

Press ctrl + shift + f In Result options, select Find results Table

enter image description here

Press find all and then, in the find window filter by select Changed Documents. enter image description here

Upvotes: 10

Hunter Nelson
Hunter Nelson

Reputation: 1975

It's super hacky but you could write a quick console/win forms application to:

  1. Scan your project directory for files with a last modified date greater than your last check in
  2. Copy them to a separate temp folder
  3. Use the visual studio's find in files feature to search that temp directory.

Upvotes: 0

Simply007
Simply007

Reputation: 464

This is not the answer for searching in pending changes in general, but it is possible to get list of TODOS only from changed files by using Task list window.

Open Task list window and use the filter for only Changed documents: Task list windows showcase

Upvotes: 1

Jansen McEntee
Jansen McEntee

Reputation: 559

It doesnt look like there is a way to do this directly but I am able to do it via a work around that might work for you.

  1. Shelve your pending changes
  2. Delete all local items
  3. Unshelve your changes (this should now bring down only the files you have edited to your local)
  4. Perform your search on the parent folder of all the edited items.

Upvotes: -1

Related Questions