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, instead at the solution level.
I noticed you can right click the solution and add a solution folder, but it comes up as some white folder, and I have my doubts as to exactly what it is supposed to be...
Basically on the file system I have c:\mySolution\myFolder...
I want that myFolder is added to the solution, so that items are also under source control...
A solution folder is a container for one or more related projects. You can create many folders within a Visual Studio solution, including nested folders. They appear in the Solution Explorer as expandable and collapsible sections.
In Visual Studio, a solution isn't an "answer". A solution is simply a container Visual Studio uses to organize one or more related projects. When you open a solution, Visual Studio automatically loads all the projects that the solution contains.
In Visual Studio, click File > Open > Folder. Navigate to the folder, and click Select Folder. This opens the folder in Solution Explorer and displays its contents, files and any subfolders.
You have to go to Tools > Options > Project and Solutions > General , where you can see “Always Shows Solution” is Unchecked. Once you checked “Always Shows Solution” , you will able to view the Solution file with in solution explorer.
Although solution folders group projects in a similar manner to the way in which directories hold files, they are not stored as physical folders on disk. They are virtual folders that are only understood by Visual Studio. It is a simple task to create a new solution folder.
Solution file. Visual Studio uses two file types ( .sln and .suo) to store settings for solutions: Organizes projects, project items, and solution items in the solution. Stores user-level settings and customizations, such as breakpoints.
You must right-click the solution, add a new folder, and then right click on the folder to add existing items or nested folders. Show activity on this post. Not quite an answer to the question, but to view folders on the file system within Visual Studio Solution Explorer there is now a way of switching views between the solution and the folders.
Usually, .vs folder is required by Visual Studio to store opened documents, breakpoints, and other information about state of your solution. which means It contains typical files like, Temporary caches used by Roslyn for IntelliSense. IIS Express applicationHost.config file.
I also would like to be able to add physical folders to a solution, but unfortunately you can't do so outside a project.
The best solution I have found is to add a solution folder with the same name as the physical folder (myFolder in your example), then add files from that physical folder to the solution folder.
However Visual Studio does not maintain a mapping between the solution folder and the physical folder which means that:
new files subsequently created in the solution folder using Visual Studio are not automatically placed in the physical subfolder (I think they are created in the solution root folder by default)
files added to the physical folder are not automatically visible in the solution folder, even with "Show All Files".
To add new files, I therefore always create the new file in the physical folder outside Visual Studio, then add it to the solution folder using "Add/Existing Item"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With