Search code examples
visual-studio-2012userappdatapath

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.


Solution

  • 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.