user4583300
user4583300

Reputation:

Find in Entire Solution in Visual Studio 2012 gets quite a lot of result from Temp folder

In Visual Studio 2012, I tried to do some search in: Find in Files->Entire Solution, then I get quite a lot results from files in C:\Uses\myusername\AppData\Local\Temp\ . The files take the name like tmpE11.tmp.cs or tmpFBEE.tmp.cpp, the contents are identical to some of the files in my solution.

My guess is that it is caused or auto-generated by some crashes, but why are they reachable by the search? I doubt if I can simply delete them or not.

Upvotes: 15

Views: 1776

Answers (3)

Justin
Justin

Reputation: 301

I am not certain if this is the same issue OP is experiencing, but I had a similar problem where temporary git-related files (like diffs) were showing up in my Find All results. These files are also kept in C:\Uses\[user]\AppData\Local\Temp\.

I found my way here when looking for how to exclude them, and the solution was a lot simpler than expected. In the Find All dialog, uncheck Include miscellaneous files:

Find and Replace -> Include miscellaneous files

Thanks to @gast128's answer for pointing me in the right direction, even though it was in front of my face the entire time. :-)

Upvotes: 7

danpop
danpop

Reputation: 977

Check if you have a diff window opened. I got the same before closing the diff window.

Upvotes: 0

gast128
gast128

Reputation: 1269

Maybe this is related to a bug reported, where lots of tmp files created and are then included in the Find Results. If I clear the 'Miscellaneous Files Folder' the search does not include the temporary files.

To display the 'Miscellaneous Files Folder' (see https://msdn.microsoft.com/en-us/library/36bhtx7w.aspx):

  1. List item
  2. On the Tools menu, click Options.
  3. In the Options dialog box, expand the Environment node and select Documents.
  4. Select Show miscellaneous files in Solution Explorer.
  5. Specify the number of documents you want to appear in the folder.

In Visual Studio 2013 you can limit the contents to 0 which effectively prevent inclusion.

Upvotes: 8

Related Questions