Visual Studio 2013 : Show folders with *.cs files in the solution explorer after they suddenly disappeared / hidden

Problem

Sometimes it happens, that you have created folders in Visual Studio for your application and had put some *.cs C# Source Code files that suddenly disappeard in the solution explorer.

Analysis

I.e. that can happen when you have forgotten to save your Visual Studio application project, berfore you have closed the IDE.

Solution

Use the file explorer and navigate to your Visual Studio solution (alternatively you can right-click a source code file in your folder and select „Open contained folder“ from the context menu).

Open the .csproj file in your solution in a text editor of your choice:

.csproj files store the project structure of the solution explorer

Go to the section where the <ItemGroup /> tags are declared and add a new section with the folders and source code files you want to show in your solution like in the screenshot below

My folders Command, ViewModelBase, ViewModel and Model disappeard over night, so i readded the marked group

You can add all cs-files with a wildcard star like it is shown in the screenshot above.

Über Björn Karpenstein

Diplom Informatiker, Programmierer, Musikbegeisterter
Dieser Beitrag wurde unter .NET, C#, Programmierung abgelegt und mit , , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

1 Antwort zu Visual Studio 2013 : Show folders with *.cs files in the solution explorer after they suddenly disappeared / hidden

  1. RachelGeork sagt:

    Hello to all
    In this difficult time, I proclivity you all
    Esteem your family and friends

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.