none
Form1 class file hidden in Solution Explorer

    Question

  • I encountered a wierd problem today when I opened Visual Studio 2015 Community.

     I have a Windows Forms project, but within the "Form1"; file folder, the Form1 class file that contains my code (that usually can be accessed in the by double-clicking on the "Form1" class file) - have suddenly disappeared from the Solution Explorer.

    I can, however access it by right-clicking on the Form1 folder and selecting "View code" or by pressing F7. I have opened multiple different solutions but the problem remains in all of them. The only files shown within the "Form1"-class folder are Form1.Designer.cs and Form1.resx.

    Do you guys have any idea how to "reset" the Solution Explorer window to behave as before?

    I´m looking forward to hear your thought regarding this.
    I tried to "repair" Visual Studio Community 2015, but the problem remains.

    Best regards,

    Emil

    Saturday, September 10, 2016 11:37 AM

Answers

  • Hi Emil,

    According to your description, I checked my Visual Studio 2015 with Update 2 and Visual Studio 2015 with Update 3. I found this issue occurs in Visual Studio 2016 Update 3. In the Update 2 version, it is the same with the first screenshot you provided.

    So I think this is the default design in Visual Studio 2015 Update 3. If you want to open the Form1 class file from Solution Explorer directly, please expend the Form1.Designer.cs node and the Form1 node, then click the Form1() function, which will open the Form1 class file directly.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 12, 2016 7:39 AM
    Moderator

All replies


  • This is how it used to look like:

    http://i.stack.imgur.com/MykCX.gif

    This is how it looks like now, notice that the Form1 class code shortcut is missing:

    http://i.stack.imgur.com/60oIO.png

    • Edited by Emil Soder Saturday, September 10, 2016 11:42 AM
    Saturday, September 10, 2016 11:39 AM
  • Hi Emil,

    According to your description, I checked my Visual Studio 2015 with Update 2 and Visual Studio 2015 with Update 3. I found this issue occurs in Visual Studio 2016 Update 3. In the Update 2 version, it is the same with the first screenshot you provided.

    So I think this is the default design in Visual Studio 2015 Update 3. If you want to open the Form1 class file from Solution Explorer directly, please expend the Form1.Designer.cs node and the Form1 node, then click the Form1() function, which will open the Form1 class file directly.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 12, 2016 7:39 AM
    Moderator