views:

59

answers:

5

I have a software project that has the following structure.

- Library A
- Library B
- Main program
- Test for Main

I have four project files (csproj) for each one, but it would be good if I can debugging/compile those projects in a single solution explorer.

  • Does Visual Studio (especially for 2010) support this feature?
+6  A: 

No, projects cannot contain other projects in Visual Studio. Solutions are used as the container for projects.

I don't understand why a project container would work but a solution would not. Can you elaborate?

JaredPar
@JaredPar : I see that I can have multiple csproj files, and the sln file can contain them. Thanks for the answer.
prosseek
+2  A: 

You can have solution folders to organize multiple projects, but you can not have a project within projects.

another option is to just move all the class files to one project and create folders for each library that you have. I do this many times to reduce solution clutter

Climber104
'areas' are a feature of Asp.Net MVC 2, not VS 2k10
BioBuckyBall
ah right...my bad.
Climber104
+1  A: 

You can have what's called a solution file which contains all of your projects.

Brian R. Bondy
+1  A: 

You can add multiple projects to a solution by right clicking the top level solution and selecting Add -> Add Existing Project or Add -> New Project

Joshua Rodgers
+1  A: 

I believe what you're thinking of is a solution. A solution can contain one or more projects:

- My Solution
  - Library A
  - Library B
  - Main Program
  - Test For Main

I don't think this is available for VS2010 Express.

pm_2
In VS2008 Express versions, solution files are supported, but the default for new projects is a project file rather than a soloution file. I know you can load solutions created by the licensed versions, and I think I remeber reading that you can create solutions, even though a new program created with the express edition does not have a solution file by default. Not sure if 2010 is the same or not.
B Pete
I found this article http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/e0aede23-6558-42a1-9fe1-440fd45d3dd4 which seems to imply that there was a restriction is 2008, but cannot find anything either way for 2010
pm_2