Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 "open folder" exclude items
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

schoenherr
Tomato Guru

Germany
160 Posts

Posted - Dec 05 2019 :  06:45:29 AM  Show Profile  Reply with Quote
visual assist, eg."Open File In Solution" seems to ignore excluded items.
I specified to exclude *.o files in VSWorkspaceSettings.json but VAX still offers to open these files.

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Dec 05 2019 :  07:42:55 AM  Show Profile  Reply with Quote
Which IDE are you using?

How are you opening your folder / solution? I have never heard of the "VSWorkspaceSettings.json" file before, so I am reading up on it now. Is this automatically read if it exists and you simply open a folder in the IDE?

I would not expect VA to list .o files normally, since these are not going to be code files.

For now, can you please make sure you are looking at VA's Open File in Solution dialog, now right click on the dialog and turn On:

Open File in Solution dialog -> Right Click -> Apply persistent filter

this will show a filter field where you can add the rule:

-.o


which will tell VA to filter out all files ending with .o from the list. The persistent filter is always applied, even when the field is not showing.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Dec 05 2019 :  10:03:11 AM  Show Profile  Reply with Quote
Can you explain what you are doing, and how you are doing it? As far as I can tell this file is only checked, if it is checked at all, in Visual Studio Code, which is a different IDE to Visual Studio, which is what VA supports:

https://stackoverflow.com/questions/30140112/how-do-i-hide-certain-files-from-the-sidebar-in-visual-studio-code

Using VS2019 I have a folder that I am opening, and in the root of this folder I have created a VSWorkspaceSettings.json file, which now contains:

"files.exclude": {
"**/.o": true
}


but this has no effect on the files that are listed in Solution Explorer after opening the folder.

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Dec 05 2019 :  10:29:32 AM  Show Profile  Reply with Quote
VA does not read that file, but does use the VS Workspace API.

According to this github issue, VSWorkspaceSettings.json is not supposed to be user editable:
https://github.com/MicrosoftDocs/visualstudio-docs/pull/3499

An additional workaround might be to add .o to:
Tools | Options | Projects and Solutions | VC++ Project Settings | Extensions to Hide

VA does honor that list when "Include all files in solution directories" is enabled -- but it might not take effect if the VS Workspace API exposes the .o files.

Edited by - sean on Dec 05 2019 10:32:03 AM
Go to Top of Page

schoenherr
Tomato Guru

Germany
160 Posts

Posted - Dec 16 2019 :  06:29:21 AM  Show Profile  Reply with Quote
Hi sorry for the long delay.

I'm using VisualStudio2019 - "Open Folder".
And according to "https://docs.microsoft.com/de-de/visualstudio/extensibility/workspaces?view=vs-2019" I placed an VSWorkspaceSettings.json in my local AppData directory for visual studio "C:\Users\...\AppData\Local\Microsoft\VisualStudio\16.0_ba92ef64\OpenFolder" which will be used as most non specific settings file.

this file contains somthing like
...
"ExcludedItems": [
".git",
".vs/",
".vscode",
"*.a",
".cmake.state",
"*.o",
"*.updt",
"*.dat",
"*.bak",
"Makefile.*"
],
...

and this is obviously used by VisualStudio2019 to determine the content of the "OpenFolder-Workspace"
the suggested workaround "Extension to hide" does not seem to work.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Dec 16 2019 :  2:10:22 PM  Show Profile  Reply with Quote
OK, thank you for the clear description. Now I am seeing these files being filtered out of the Solution Explorer view of the folder.

If you go to VA's Open File in Solution dialog, right click and select "Display edit control for persistent filter" a second filter field will be shown. If you now set this field to be:

-.o

this will stop VA from listing any of these .o files in this dialog, so you don't have to work around them.

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Dec 16 2019 :  2:35:38 PM  Show Profile  Reply with Quote
Thanks for the follow-up. I've opened case=141644 to address the issue.
Go to Top of Page

schoenherr
Tomato Guru

Germany
160 Posts

Posted - Dec 17 2019 :  03:07:08 AM  Show Profile  Reply with Quote
Thanks for addressing the issue,
the persistent filter workaround works :-)
Go to Top of Page

Annihilus
New Member

3 Posts

Posted - May 28 2024 :  10:47:45 AM  Show Profile  Reply with Quote
So... 4 years later and VA still ignores VSWorkspaceSettings.json?
What's the status of case=141644?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - May 28 2024 :  12:18:46 PM  Show Profile  Reply with Quote
We were advised by Microsoft that we should be looking at, and using the .vscode\settings.json file instead, which we have supported for a while now.

Support is enabled by the setting:

VA Options -> Performance -> Do not parse files excluded by .vscode\settings.json (requires restart)

This is a sample settings.json file, that I use for testing this, which excludes both directories and specific files:

{
    "files.exclude": {
        "*/cpp_dll_cpp17": true,
        "cpp_dll_cpp20" : true,
        "**/bugs" : true,
        "**/code_formatting_tests/clangFormatBase" : true,
        "**/test_plain_text.txt" : true,
        "**/*.xaml" : true
    }
}

zen is the art of being at one with the two'ness
Go to Top of Page

Annihilus
New Member

3 Posts

Posted - May 28 2024 :  1:05:56 PM  Show Profile  Reply with Quote
Thanks for the quick response, feline!

But I am super confused that MS would recommend using a vscode setting in vs.
I still need the VSWorkspaceSettings.json to filter the project workspace itself, so having a separate .vscode\settings.json would be completely redundant. This is a weird concept, to be honest.

Anyway, I tried it and it doesn't seem to work properly. According to the documentation I found, a key like "**/bugs" should filter out *any* directory called "bugs" in the workspace, but apparently it only works on the root directory. Same for the "**/*.xaml" example, I still see all those crap files in the Open File in Solution dialog.

On the other hand, using a persistent filter seems to do a much better job at what I want, but it's actually *not* persistent across sessions. It's quite a mess. It shouldn't be that hard to define an ignore list.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - May 29 2024 :  07:51:32 AM  Show Profile  Reply with Quote
Personally I don't understand the recommendation from Microsoft to use the .vscode\settings.json either, but this was what we have told, so it is what we went with, in the hopes of avoiding to much disruption when the supported files change down the line.

For the exclusion rules though, I am using the above file, and for me, the "**/bugs" entry is filtering out the following directories, and all of their content:

entry == "**/bugs" : true,
is excluding the directory == \src\ManualVaTests\bugsis excluding the directory == \src\ManualVaTests\ManualVaTests_VS2017\c_sharp_class_library\Bugsis excluding the directory == \src\ManualVaTests\ManualVaTests_VS2017\c_sharp_class_library2\Bugsis excluding the directory == \src\ManualVaTests\ManualVaTests_VS2017\cpp_clr_class_library\bugs
have you restarted the IDE to make sure this setting is taking effect?

What persistent filter are you talking about? There is a persistent filter available in VA's Open File in Solution dialog, but that is persistent for me. I have just double checked, and yes, persistent across IDE restart as well.

zen is the art of being at one with the two'ness
Go to Top of Page

Annihilus
New Member

3 Posts

Posted - May 29 2024 :  08:59:59 AM  Show Profile  Reply with Quote
Hi again.

For context: We are transitioning from a VS Project (.sln and .vcxproj files) to a cmake based project. So I'm opening the entire project folder in VS now, and there is an extensive LIBRARIES subfolder in there which I want to be ignored both by the IDE as well as VA.
(There are more folders that I'd like to be excluded, including nested ones, but LIBRARIES is the most problematic one, so let's focus on that).

As already mentioned, creating a VSWorkspaceSettings.json takes care of the IDE, but not VA.
There are two main problems:
1. When I open the project folder, VA takes ages to "create instance of template xyz". Most of these templates are only used within LIBRARIES.
2. When I use the Open file in Solution dialog, it shows me a lot of stuff that I don't want to see.

So I created a .vscode\settings.json as you suggested:
{
    "files.exclude": {
        "**/LIBRARIES": true
    }
}


After activation of the checkbox "Do not parse files excluded by .vscode\settings.json" and a restart of the IDE, this is the effect:
1. Scanning seems entirely unaffected. Still takes ages, still creates all of those template instances.
2. Open File in Solution dialog shows significantly fewer files from the LIBRARIES folder... but some are still there, so I have no clue what's going on.

I tried solving at least the second problem by using a Persistent Filter, but it's gone after an IDE restart.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - May 29 2024 :  12:53:27 PM  Show Profile  Reply with Quote
I have just double checked, and this setting worked with CMake projects, so no SLN file, long before it worked when opening a solution file. So the fact that you are moving over to CMake really should not matter, and excluding the library directory tree is exactly the sort of situation this setting is designed for, and works correctly for for me.

For the persistent filter, are you working with more than one copy of Visual Studio open? Any problems with the IDE crashing? I ask because VA's settings are saved on exit, so if have two copies of the IDE open, the last IDE instance to be closed will save out its settings last, possibly overriding settings you set in the first instance.

Is your forum email address good to send you test files to? I am going to look out and edit one of my test cases for excluding files and directories and send it to you, so we can try testing the same thing, to compare results. Having to configure two files is definitely unhelpful, but VA does ignore the excluded directories for me, so I don't know why this is failing for you.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - May 30 2024 :  12:53:19 PM  Show Profile  Reply with Quote
I have emailed you:

case=164592

Also, just creating the .vscode\settings.json file on its own is enough for VS2022 on my system to exclude both LIBRARIES directories from the Solution Explorer window. So I don't know why you are getting such different results. Hopefully the test solution I have sent will help.

zen is the art of being at one with the two'ness
Go to Top of Page

GregDude
Senior Member

47 Posts

Posted - Jul 17 2026 :  01:06:26 AM  Show Profile  Reply with Quote
Reading this thread in 2026, encountering some of the same issues, with same goal of hiding up to a million files from VA and VS, I wonder if the Microsoft representative thought you were developing a Visual Studio Code extension, not Visual Studio? The .vscode\settings.json has nothing to do with VS, but does for VSCode.
At least the VSWorkspaceSettings.json ExcludeItems + other local changes appears to have reduced the Open File in Solution from 1.1m files to 300k for me.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Jul 17 2026 :  08:48:57 AM  Show Profile  Reply with Quote
Does your solution actually contain over 1 million files? It seems unlikely, but certainly isn't impossible.

If not, can you please press the gear icon in the top right hand corner of the OFIS dialog, and look and see if you have "Include all files in solution directories" turned On or Off?

I had another customer a few months ago who was getting several million unwanted files in the OFIS dialog, and we spent quite a while trying to filter the list down to something sensible, before discovering that this setting had gotten toggled on, which was why all of the build files were being pulled in.

zen is the art of being at one with the two'ness
Go to Top of Page

GregDude
Senior Member

47 Posts

Posted - Jul 19 2026 :  8:09:58 PM  Show Profile  Reply with Quote
>>If not, can you please press the gear icon in the top right hand corner of the OFIS dialog, and look and see if you have "Include all files in solution directories" turned On or Off?

Thanks for responding. The "Include all files in solution..." was unchecked. The "Show only files in the current solution" was checked.
By adding some persistent filters, I now see 60K of 230K files. Better.
I still need to exclude more folders with 3rd party files one way or another. EDIT: I have re-tried .vscode\settings.json with no success.

It would be great if the files could be related to the Startup Item rather than whole solution due to CMake folder projects often containing more targets or such compared to MSBuild, where multiple solutions would filter more finely.

Edited by - GregDude on Jul 19 2026 8:44:22 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Jul 20 2026 :  09:30:48 AM  Show Profile  Reply with Quote
OK, working with CMake explains how you are seeing such a large number of files, since VA doesn't have a lot of guidance on which files you do and do not want to see.

Is the ".vscode\settings.json" file having any effect at all for you?

How are you using it? To just exclude directories, or also exclude file extensions? I am wondering if excluding file extensions would be a more successful approach here.

I would have expected that excluding build directories would exclude the bulk of the files you want filtered out, but this is obviously just an assumption on my part.

zen is the art of being at one with the two'ness
Go to Top of Page

GregDude
Senior Member

47 Posts

Posted - Jul 20 2026 :  7:00:11 PM  Show Profile  Reply with Quote
I'm trying to exclude folders, whole sub directories.
The ".vscode\settings.json" file does not appear to have any effect.
If I have folder tree like:

Root
+-.vs
+-.vscode
+-FolderA
....+-FolderB
+-Src

I've tried combinations of
**/FolderA
**/FolderA/FolderB
root/FolderA
**/root/FolderA
etc. with no apparent effect. In attempt to exclude FolderA and/or FolderB


Edited by - GregDude on Jul 20 2026 7:01:13 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Jul 21 2026 :  07:28:30 AM  Show Profile  Reply with Quote
Can you email me at:

[email protected]

including this thread ID or URL in the description, so we can match it up. I can then easily reply with a simple CMake test case, that I use for testing excluding directories. I have a collection of test cases I have put together when testing this, but the exclude feature does work for me. So sending you a simple test case, to see if you get the same results seems like a good place to start.

zen is the art of being at one with the two'ness
Go to Top of Page

GregDude
Senior Member

47 Posts

Posted - Jul 26 2026 :  6:09:43 PM  Show Profile  Reply with Quote
@feline, I sent you email but haven't heard back apart from auto email today saying case will close soon without further response.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19405 Posts

Posted - Jul 31 2026 :  08:28:02 AM  Show Profile  Reply with Quote
Apologies for the slow reply, an emergency visit to hospital tends to get in the way. Recovering now.

But I recall your email, and I was sure I replied, with an attachment, and was waiting to hear back from you. Do you have the case number on hand, that will make it easy for me to look it up here and see what I am seeing?

I am wondering if somehow I replied to the wrong email address, or something like that.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000