Visual Studio 2022 Bin folder expanding in Solution Explorer

Kuler Master 141 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 Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
408 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.
6,995 questions
No comments
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,026 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.

    No comments

4 additional answers

Sort by: Most helpful
  1. Viorel 82,906 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.

    No comments

  2. Kuler Master 141 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

    No comments

  3. sreejukg 9,171 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

    No comments

  4. Yijing Sun-MSFT 7,026 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.

    No comments