crayden
crayden

Reputation: 2270

How to break up a Visual Studio Solution into Different Physical Folders and Projects

I have discovered a very nice architecture that breaks a Visual Studio solution into different folders and projects.

After creating the blank solution, I add "New Solution Folder" in Visual Studio, but nothing appears within the physical directory. When I add folders to the physical directory, they do no appear in Visual Studio.

How can a physical folder be added, with sub-folders and projects within?

MySolution

MySolution
│   MySolution.sln
│
└───src
│   └───ApplicationCore
│       │   ApplicationCore.csproj
│   
└───tests
    └───UnitTests
        |   UnitTests.csproj

Upvotes: 0

Views: 51

Answers (1)

Stephen Kennedy
Stephen Kennedy

Reputation: 21548

"Solution Folders" are virtual - they are an organisational aid in Visual Studio and don't map to physical folders, at least not automatically.

Right click on your solution folder and click "Add" (see image below). You can then add a new or existing project into the virtual solution folder. If you create a new project, you can then choose where it should be physically stored.

enter image description here

Upvotes: 1

Related Questions