prosseek
prosseek

Reputation: 190799

Can a project contain other projects with Visual Studio?

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.

Upvotes: 4

Views: 343

Answers (5)

Chris Kooken
Chris Kooken

Reputation: 33870

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

Upvotes: 0

Paul Michaels
Paul Michaels

Reputation: 16695

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.

Upvotes: 1

Joshua Rodgers
Joshua Rodgers

Reputation: 5404

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

Upvotes: 1

Brian R. Bondy
Brian R. Bondy

Reputation: 347216

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

Upvotes: 1

JaredPar
JaredPar

Reputation: 754715

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?

Upvotes: 9

Related Questions