Visual Studio 2019 does not show all files in project folder of asp.net web site

Aminnia, Ben 6 Reputation points
2022-09-19T16:19:24.037+00:00

With I select Open Folder in File Explorer, it shows all 166 items. But, in the project folder, it only shows the first 12 of those files.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,243 questions
{count} votes

9 answers

Sort by: Most helpful
  1. Aminnia, Ben 6 Reputation points
    2022-09-20T14:58:47.62+00:00

    File extensions that are not getting displayed in Visual Studio are aspx and aspx.cs
    Yes, the project loads in Visual Studio, and I am able to run it
    I have attached screen shots which show 166 files in File Explorer and only 12 files in Visual Studio (under Reports folder)
    243074-12-in-visual-studio.png

    0 comments No comments

  2. Aminnia, Ben 6 Reputation points
    2022-09-20T14:59:50.473+00:00

    243039-166-in-file-explorer.png

    0 comments No comments

  3. AgaveJoe 26,181 Reputation points
    2022-09-20T19:44:30.503+00:00

    You misunderstand the Web Forms project and solution files in Visual Studio. You need to add the files.

    Right click the Reports folder -> Add -> Existing item.... -> navigate to the folder that has the files you wish to add. Select all the files you wish to add then click the Add button.

    0 comments No comments

  4. Aminnia, Ben 6 Reputation points
    2022-09-20T20:16:37.167+00:00

    I tried your recommendation for Add -> Existing item.... but, there are two issues:

    1. It only adds .aspx files (not .aspx.cs files, which are associated with each .aspx file).
    2. When I close and re-open the solution, all those added files disappear again.

  5. Aminnia, Ben 6 Reputation points
    2022-09-21T15:19:28.117+00:00

    Thank you, Deepak

    I am familiar with these, but there are issues which are unresolved:

    I have already tried 'Show All Files' but it does not help. It still shows only a few of the files under Reports folder.

    Also, I still don’t have an answer to my earlier comment: When I close and re-open the solution, all those added files disappear again, so if I need to work on them, I will need to add them again.

    Maybe this is something about the 2019 version of Visual Studio, which has a limit on maximum number of files to show under each folder?