开发者

Can a project contain other projects with Visual Studio?

开发者 https://www.devze.com 2023-01-19 15:39 出处:网络
I have a software project that has the following structure. - Library A - Library B - Main program - Test for Main

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 pr开发者_运维问答ojects in a single solution explorer.

  • Does Visual Studio (especially for 2010) support this feature?


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?


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


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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消