I prefer for the solution file to be in the same folder as the project files in Visual Studio. I know this is accomplished by unchecking the "Create directory for solution" checkbox. However, VS 2008 defaults to having the box checked.
I am interested in other people's opinions on whether the solution file should live in the same directory.
When you create a new project, Visual Studio saves it to its default location, %USERPROFILE%\source\repos. To change this location, go to Tools > Options > Projects and Solutions > Locations. For more information, see Options dialog box: Projects and Solutions > Locations.
Creating a Solution NET will create a new solution with the same name as the project, placing the solution files in the same directory as the project. Although this works fine for small projects, it isn't well suited to more complex applications.
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, click Tools > Options. Expand Projects and Solutions and click Locations. The Projects location field defines the default location for storing new projects. You can change this path if you are using a different working folder.
When a solution contain more than one project, I like a solution file in a parent directory and the project files in its child directories.
When a solution contains many projects (my current solution has 36 projects/assemblies), then I'll have:
I also agree with having the solution and its project in the same folder, if the solution only has one project. And if you start like this and want to add another project to the solution later, it's easy to change (e.g. create a new solution in a parent directory or move your existing solution, and add/re-add the existing project to it).
Just don't put several projects in the same folder.
I prefer it something like this:
MyProject
src
Domain
Application
Infrastructure
UI
solutions
MyProject
Infrastructure
Domain
Solutions folder contains solution folders. All projects are referenced from src folder.
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