i am a good but not so advanced .NET Developer. This is more of a Expert to juniors knowledge transfer request.

I was thinking, in Visual Studio you can Add projects inside a solution. Of-course these projects will carry different namespace.

My question is

  • Why to build a project inside a solution
  • When it is good\useful to build multiple project inside a solution.
有帮助吗?

解决方案

I suppose you mean more than one project in a solution, right?

We use it mainly from a library perspective. You receive more than one assembly and in this way you can share or exchange only parts of you application. This is for example helpful if you have a bug in your application which touches only a part of your app. In this case you can fix and exchange only the bad assembly instead of the whole app.

其他提示

It allows you to separate parts of an application. Your GUI, business logic, and data access can all be separate.

In addition, projects within a solution can reference each other with "project references". This ensures they all build with the same configuration: all Debug or all Release. Also, a projects can build when the projects they reference change.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top