I have a big-ish legacy project and every so often when I use Ctl-Shift-T to got to a file by name (because it's convenient), I end up at some copied version (be it in .vshistory or source server, usually the latter).
At first I don't notice it because everything looks exactly as it should. Only when my changes aren't applied or all breakpoints refuse to work (even with the "require exact location match" off) I eventually realize it happened again.
So how to block (or at least deprioritize) Visual Studio code search from pointing me towards these files? (or make a popup or any notification that it happened again so I realize it before getting annoyed and confused why nothing works for 5 minutes before realizing)
Any and all answers I find are regarding VSCode (thanks Microsoft's naming schemes), which has a great solution for this issue that sadly doesn't apply to Visual Studio.
How to exclude specific folders when using code search in visual studio?
After searching MS documents, i am afraid that there is no some setting.json files like VSCode to configure excluded items.
However i have noticed a similar ticket reported earlier at here. It provides a solution to exclude folders but i found it does not work for VS2022 based on my test or maybe i miss something.
Create the “VSWorkspaceSesttings.json” file in your opened folder or its direct “.vs” subfolder with content like so:
{
"ExcludedItems" : [
"your excluded folder name/",
]
}
I would suggest you raise a feature request at Developer Community That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and categorize your suggestions.