Include only certain file types when searching in Visual Studio

后端 未结 6 839
情书的邮戳
情书的邮戳 2020-12-13 11:44

Often when I want to search through my code in Visual Studio, I know the thing I\'m looking for is in some C# code. However, as I\'ve used the same variable name in a JavaSc

相关标签:
6条回答
  • 2020-12-13 12:20

    Instead of Ctrl + F, I think it is Ctrl + Shift + F which gives you the choice to specify file types, you wish to look into.

    0 讨论(0)
  • 2020-12-13 12:22

    In the Find dialog box, go to "find options->Look at these file types".

    Type in you own string, eg, *.cs, *.aspx, *.ascx. The click the "find all" button.

    0 讨论(0)
  • 2020-12-13 12:24

    In the Find in Files dialog (Ctrl+Shift+F), there should be a field called Find Options. You should be able to enter the extensions of fields you want to search in a field in this dialog:

    *.cs; *.aspx; *.ascx; 
    
    0 讨论(0)
  • 2020-12-13 12:24

    Another way to limit file searches is by only choosing certain folder sets.

    0 讨论(0)
  • 2020-12-13 12:27

    enter image description here

    You can choose file types from default or type your own. Regular expressions available for complex search.

    0 讨论(0)
  • 2020-12-13 12:35

    I like to exclude js files by using the following search: *.a*;*.cs*;

    Most of the times, I end up searching for stuff in aspx, cs, cshtml files so this is quite helpful. Notice how I use *.cs* instead of *.c* since the latter would select jquery custom files such as jquery.custom1234.js (which I usually use in most of my projects), of course if you don't you could just use *.c*.

    0 讨论(0)
提交回复
热议问题