Answer (April 30, 2025):
I had the same issue in Visual Studio Community 2022 where the file (e.g., UnitTest1.cs
) was open, but the content wasn't visible in the editor—even though the file existed and was part of the project.
Restarted Visual Studio
Rebooted my system
Unfortunately, neither of those worked.
I updated Visual Studio to the latest version, and after the update, the issue was resolved.
If you're facing a similar problem, I recommend checking for updates from:
Help > Check for Updates