Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Visual Studio not showing all source files in Solution Explorer

*I couldn’t find any info online about the exact same issue I’m having

I’m using Visual Studio 2022. Last time, I was working on a C# library, and closed the IDE. I saved all source files, but I didn’t save changes to the solution file itself, which is what VS offered me to do when I attempted to close the IDE. I didn’t think much of it, since the solution file pretty much holds info about the solution itself, like projects, programming language, etc.

Now, I’m opening a solution with Visual Studio. The tabs for source files are still open, but they’re not showing in the Solution Explorer. They were showing in Solution Explorer previously, before I re-opened the solution. Please look at the image below – tabs show fine, Solution Explorer on the other hand, on the right side, is not:
IDE Screenshot
In the image above, look at the text below Logger.cs tab. You probably can’t read this language, but instead of displaying the source file, it just says "Other files".

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried clicking the Refresh button in the Solution Explorer, but that changes nothing.

Just to clarify, these files are indeed there. From Windows Explorer, this is what the solution directory looks like:
Solution Directory Screenshot

One file Visual Studio shows is Class1.cs. Just an empty class file. This is a default source file for Class Libraries (.NET Framework in this project), I’ve never edited it, probably why it’s there.

I just want to know, is this a bug in Visual Studio, or it’s entirely normal, that can or cannot be fixed? If it can, how can I fix the issue?

Any help would be appreciated.

>Solution :

From Visual Studio menu, select Project menu then Show all files menu option which in Solution Explorer will show all files in the current project. Also, you may need to right click on each file that was not showing but is now to right click and select Include in Project context menu item. Once done, select Show All Files to hide folders like obj and bin.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading