Visual Studio 2022 Bin folder expanding in Solution Explorer

Kuler Master 246 Reputation points
2021-11-13T08:54:38.027+00:00

Hello,
As soon as I open the project (ASP.NET WebForms) I see that Bin folder is expanded in Solution Explorer.
Is there an option that I can set in order to prevent this behavior?
Thank you very much

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,253 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,236 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,066 Reputation points
    2021-11-15T07:08:15.507+00:00

    Hi @Kuler Master ,
    According to your description, I tried the brother's answer above and it has some minor flaws. I think, you need to check "Track Active Item in Solution Explorer" and uncheck "Restore Solution Exporer project hierarchy state on solution load".
    Press Tools--> Options-->Projects and Solutions-->General
    149267-capture.png
    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Viorel 112.1K Reputation points
    2021-11-13T14:56:03.41+00:00

    Try unchecking the "Show All Files" button that is shown in Solution Explorer's toolbar.

    0 comments No comments

  2. Kuler Master 246 Reputation points
    2021-11-13T18:00:08.617+00:00

    Hmm I am aware of that solution but I want to keep the bin folder like it was shown in VS 2019 - grayed BUT collapsed.
    I want to be able to right click the bin and select "Open Folder in File Explorer". If I toggle Show All Files, I don't see the bin folder anymore

    0 comments No comments

  3. Sreeju Nair 11,606 Reputation points
    2021-11-14T12:43:35.333+00:00

    It might be due to the tracking feature of solution explorer. In Visual Studio tools menu, go to Options, then select General Tab under Projects & solutions, then check "Track Active Item in Solution Explorer" option. Restart visual studio and see whether it fixes the issue.

    149127-image.png

    0 comments No comments

  4. Yijing Sun-MSFT 7,066 Reputation points
    2021-11-15T07:08:15.647+00:00

    Hi @Kuler Master ,
    According to your description, I tried the brother's answer above and it has some minor flaws. I think, you need to check "Track Active Item in Solution Explorer" and uncheck "Restore Solution Exporer project hierarchy state on solution load".
    Press Tools--> Options-->Projects and Solutions-->General
    149267-capture.png
    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    0 comments No comments