Excluding specific files from Visual Studio search
search, visual-studio, visual-studio-2012
Solution
In Visual Studio 2019 they modernized the "find in files" feature, now you can exclude files, file extensions and directories using an exclamation mark before the items to be excluded in the "File types" textbox, like this:
`*.*;!jquery.js`
another example: `!*\bin\*;!*\obj\*;!*\.*;!*.xml`
More info: https://devblogs.microsoft.com/visualstudio/modernizing-find-in-files/
Problem
Is it possible to exclude certain files from search in Visual Studio. For example jquery.js is almost always polluting my search results with half result coming from that file. I know you can white-list specific types, but when I want to search in .js extension is there solution for that? Vote here for feature: https://developercommunity.visualstudio.com/idea/405990/code-search-exclude-files-from-search.html?inRegister=true