Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a C# solution and how to use it?

I am new to C# (coming from Python and C) and when I start a new project in Monodevelop or Visual Studio, the project is put in a "solution" container.

I had a look at Microsoft description of what a solution is but I don't really understand the benefit of this and how I should use it.

The Microsoft documentation says:

A project is contained, in a logical sense and in the file system, within a solution, which may contain one or more projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with any project. In a literal sense, the solution is a text file with its own unique format; it is generally not intended to be edited by hand.

Could someone explain what "solutions" are here for?

like image 795
Jacques Gaudin Avatar asked Nov 03 '16 11:11

Jacques Gaudin


People also ask

Whats is the meaning of AC?

AC is used to refer to an electric current that continually changes direction as it flows. AC is an abbreviation for 'alternating current'. In Europe, AC is usually generated at 50 Hz. ... a portable AC generator.

What is AC vs AC?

A/C unit (air conditioning unit) is a single machine. (e.g. What's that ugly box on your wall? - It's the air conditioning unit.) A/C (air conditioning) is the entire system, or the result it gives.

What does AC stand for in gaming?

Armor Class, a common property in role playing games used to determine the amount of armor a character has.

What does AC stand for in heating?

This mechanical system is an integral part of heating and cooling any modern building. AC is short for air conditioning. The terms HVAC and AC are often used interchangeably.


1 Answers

A solution is a workspace that combines multiple projects, which are usually related to each other. The construct is very useful in situations when some code needs to be shared among multiple projects.

For example, if you are developing a web site with a separate server-side component, you could segregate it into several related projects:

  • A project containing common interfaces, producing a DLL
  • A project containing database definition, producing an RDBMS deployment script
  • A project containing server-side API implementation, producing an executable
  • A web site project, producing an IIS deployment script

These four projects are connected to each other. Placing them into a single solution lets you access individual parts, while taking advantage of common indexing that Visual Studio does for you to simplify searches for usage and to help with refactoring.

like image 187
Sergey Kalinichenko Avatar answered Sep 26 '22 22:09

Sergey Kalinichenko