Excluding specific files from Visual Studio search

前端 未结 6 994
一整个雨季
一整个雨季 2021-02-01 00:15

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 tha

6条回答
  •  忘了有多久
    2021-02-01 00:48

    I've got the same problem with unwanted .js files polluting the search result. Especially the minified versions (e.g. jquery.min.js) are really annoying since they consist of only one (1) single very very long line. All of that line is displayed line-wrapped in search result. Not ideal!

    Possible solutions:

    • Since .js files are (normally) just static content, you should be able to name them as you like. Rename it to jquery.min.js.nosearch and include the file with in HTML.

    • Get these files from an CDN and delete your local files.

    • Exclude these files from the VS project, provided that you can handle the inclusion of them in an other way when needed, e.g. when deploying (and provided that you scope your search to solution/project, not folder).

提交回复
热议问题