What is a solution folder in Visual Studio?

I have a Visual Studio 2008 solution, and I would like to include a real folder in the solution, but not at the project level, but at the solution level.

I noticed that you can right-click on a solution and add a solution folder, but it looks like a white folder, and I have doubts about what it should be ...

Basically in the file system I have c: \ mySolution \ myFolder ...

I want myFolder to be added to the solution so that the elements are also under source control ...

+52
directory tfs visual-studio folder solution
Dec 17 '08 at 9:34
source share
6 answers

I would also like to be able to add physical folders to the solution, but unfortunately you cannot do this outside of the project.

The best solution I found is to add a solution folder with the same name as the physical folder (myFolder in your example), and then add the files from this physical folder to the solution folder.

However, Visual Studio does not support mapping between the solution folder and the physical folder, which means:

  • new files created later in the solution folder using Visual Studio are not automatically placed in the physical subfolder (I think they are created in the default solution root folder)

  • files added to the physical folder are not automatically displayed in the solution folder, even with "Show all files".

To add new files, I therefore always create a new file in a physical folder outside of Visual Studio, and then add it to the solution folder using "Add / Existing Item"

+37
Dec 17 '08 at 9:55
source share

What I have done historically is to create a project to easily store files (DLLs, etc.).

You can do it too. This project can be called any folder that you are trying to create.

+9
Dec 17 '08 at 9:53
source share

Keep track of this ...

  1. Create a solution folder from Visual Studio.
  2. Right-click the solution folder to create a new project.
  3. Change the default location path to add a new physical folder name immediately after it with a backslash. Something like ... C: \ Project \ Test \ New Physical Folder
  4. Click OK to create the project.

Then the new project will be placed in your new New Physical Folder .

+6
Feb 01 '11 at 16:04
source share

You can also add offline files to the solutions folder, and they will be controlled by the source code. But be careful that VS tends to put these files in the same folder as the solution file - “Solution folders” are virtual and do not bind to real folders of the file system. To have real filesystem folders, I think you will need to create the structure yourself, and then select "Add an existing item."

+3
Dec 17 '08 at 9:52
source share

From MSDN:

"If you are working with a solution that contains many projects, you can use Solution Folders to organize related projects into groups, and then perform actions on these project groups."

You do not want what the composer had in mind in the solutions folder. This made them organize large decisions into groups.

For your problem, I think this is the task for your Installation project to collect these files: installation instructions, global help, etc.

+3
Jan 23 '12 at 13:37
source share

You can use the solution folder to group files in the solution, but the solution folder does not represent the folder on the disk, as its logo suggests. (May contain links to files and links to projects.)

+2
Dec 17 '08 at 9:53
source share



All Articles