问题
Here my issue:
It seems the solution explorer is not displaying the content of the expanded solution tree. It only shows the the first level of the tree. If you click expand all or expand the branch out it's empty. Ok, I know they are part of the solution by be able to see them in the disk structure and they get compiled and can be checked by plugins like "codemaid". This occurs on new projects and old projects.
I tried all sorts of things with the different filters and all the settings I can find, but I would think if the filters where off and show all files on you see either things in the project. Oh and yea I selected both the solution and project branches.
I have ran the repair and did a install and reinstall of VS2015, and searched the web for months :) This really all started with me organizing my code into sub folders and not showing up in the explorer. So I been writing a lot of "flat" code where the classes are in the root of the project. Older version of VS are still working correctly (right now I have to reinstall because I removed them).
My current train of thought to resolve this is track down the tree object and make sure it's a up-to-date object.
回答1:
The problem described in this link sound just like your (and currently my) problem:
https://community.flexerasoftware.com/showthread.php?219321-Visual-Studio-2015-Solution-Explorer-nodes-do-not-show-files-for-other-projects
So, it seems there is a bug in VS2015. InstallShield triggers it. Maybe other add-ons do also.
If I have an InstallShield project loaded in a 2015 solution, I only get one level of files, (i.e. the filters show nothing). If I unload the InstallShield project and refresh the Solution Explorer (e.g. toggle show all on a per project basis, or close and re-open the project) then all my files show up again!
回答2:
It happened to me too after a crash. I didn't know why some of my projects disappeared all the sudden. After some digging, I found there was a menu item called Unhide Folders if you right-clicked on the solution in the Solution Explorer. Selecting it will bring back your folder and projects. At lease it has worked for my case.
The sad thing is that vs2015 won't tell you that your solution is in a folder-hidden mode. :(
回答3:
I stumbled over the problem, apparently down the line a plug-in had boinked it, When I reinstalled it and removed it (again) it fixed it.
In the process of updating, and reinstalling, and removing the plug-in the problem fixed itself.
It was fixed the 3rd time I went down the extension list and remove all the removable extensions. And happen to check the for the problem before the many hours it would take to repair it.
But, I have no clue which one(s) caused it, and going to keep closer eye on it as I work on it.
My feelings it was left over garbage from all the upgrades that where going on from VS2010 to VS2015. But I do know this has always happened since I install VS2015 on this computer, now I am happy it working correctly now. Thanks for all the help including the nice editor :)
回答4:
In my case it seems to have been the Mexedge Stylesheet Extension 2.4 that caused the problem. I disabled it and restarted VS and the problem was gone.
Before that I made various attempts with restarting VS and unloading individual projects in the solution, but with no luck.
I don't know if the latest version of the extension (2.6) works better.
回答5:
It happened to me as a result of having multiple namespaces in my classes/XAML pages. I wasn't able to see class files in one of my folders in the Solution Explorer. Once I got them all in the same namespace and restarted Visual Studio, it returned to normal.
回答6:
Randomly opening/closing nodes (especially the solution node) in the solution explorer fixes the visual bug for me.
来源:https://stackoverflow.com/questions/32540237/visual-studio-2015-missing-content-in-solution-explorer-branches