I have a large solution with many .NET 6.0, C# projects. One of them (a Prism module, one of 11) has a couple of odd tree nodes that appear in Solution Explorer. I cannot get rid of them nor figure out why they are there. One corresponds to a disk folder, one does not. They are circled in red below
The obj
tree node obviously corresponds to an actual folder on disk. But the same "obj" folder lives underneath most of the projects, yet only shows up for this one module.
I've tried a few things to get rid of it
The Imports
tree node makes even less sense There's no folder for it on disk. It seems to refer to items in .NET that my app is using.
I cannot find any entry in the solution's .gitignore file that refers to either "Imports" or "obj" by name (except a line excluding "*.obj"). I see nothing in the raw project file -- which is identical to many others that would explain this any of this. I have gone through it line by line comparing to others.
I am using VS 2022 but I know I saw this with VS2019 as well
Any ideas how to make these things go away...?
Toggle the "Show all files" button.
The button applies to each project separately, so that would explain why you see "obj" folders in some places and not others. For those projects that have "show all files" toggled on, you'll see the files and folders that live under a project on your hard drive but that are not actually part of the project. For those project that have "show all files" toggled off, you won't see such files in the Explorer.
Unfortunately I do not know anything about Prism, but I imagine the same sort of thing is happening for the Imports. Or Imports could be more like References in a C# project and they will just always show.