Vs community 2022 W11 : solution explorer empty (app c# wpf)

guillaume chapoutot 0 Reputation points
2023-08-07T17:44:49.0366667+00:00

Hi !

When i create a new project c# wpf with Visual Studio 2022 Community, i have nothing in the solution explorer.

My page MainWindow.xaml / MainWindow.xaml.cs exist but not for the solution explorer....

I've miss something in settings?

Thx a lot !

Developer technologies | Visual Studio | Other
Developer technologies | XAML
Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 48,681 Reputation points Microsoft External Staff
    2023-08-08T05:16:15.9266667+00:00

    Hi,@guillaume chapoutot. Welcome Microsoft Q&A.

    Here are some steps you could take to troubleshoot the issue:

    Refresh Solution Explorer: Sometimes, the Solution Explorer might not update automatically. Try right-clicking on the solution in the Solution Explorer and selecting "Refresh."

    Check Filter and Project View Options: Make sure that you have not applied any filters or project view options that could hide the files. In Solution Explorer, look for the "Filter" and "Project View" dropdowns at the top of the window and ensure that they are set correctly.

    Check Project Files: Open the project folder in Windows File Explorer and verify that the expected files (MainWindow.xaml and MainWindow.xaml.cs) actually exist in the project folder. If they are missing, you might have encountered an issue during project creation.

    Reload Project: Right-click on the solution in the Solution Explorer and select "Reload Project." This can sometimes help refresh the Solution Explorer's view of the project files.

    Reset Visual Studio Settings: If none of the above steps work, you can try resetting Visual Studio settings to default. Go to "Tools > Import and Export Settings" and choose to reset the settings.

    Reopen Visual Studio: Sometimes, simply closing and reopening Visual Studio can resolve minor glitches or display issues.

    Create a New Project: If the problem persists, you might consider creating a new C# WPF project from scratch and checking if the issue occurs again. This could help determine if the problem is specific to your current project.

    Repair Installation: If none of the above steps work, it's possible that there might be an issue with your Visual Studio installation. Try repairing the installation using the Visual Studio Installer.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.