Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CSharp_Prog_Guide.doc
Скачиваний:
16
Добавлен:
16.11.2019
Размер:
6.22 Mб
Скачать

Решения как контейнеры

В Visual Studio реализованы контейнеры: решения и проекты, чтобы сделать возможным использование в интегрированной среде разработки (IDE) всего диапазона средств, конструкторов, шаблонов и параметров. Также, Visual Studio предоставляет папки решений для того, чтобы структурировать связанные проекты по группам и затем выполнять действия над этими группами проектов.

Проект включает набор исходных файлов и связанные метаданные, например ссылки на компонент и инструкции построения. Как правило, при построении проектов создается один или несколько выходных файлов. Решение включает один или несколько проектов, а также файлы и метаданные, необходимые для определения решения в целом:

Visual Studio автоматически создает решение при создании нового проекта. При необходимости к решению можно добавлять другие проекты. В окне Обозреватель решений содержится графическое представление всего решения, которое позволяет управлять проектами и файлами в процессе разработки решения.

Можно создавать пустые решения без проектов и использовать редакторы и конструкторы Visual Studio для изменения автономных файлов. Обозреватель решений предоставляет папки специально для элементов, не являющихся проектами.

Solutions

Solutions manage the way Visual Studio configures, builds, and deploys sets of related projects. A Visual Studio solution can include just one project or several projects built jointly by a development team. A complex application might require multiple solutions.

Advantages

Solutions allow you to concentrate on developing and deploying your projects, instead of sorting through all the details of managing project files, components, and objects. Each Visual Studio solution allows you to:

  • Work on multiple projects within the same instance of the IDE.

  • Work on items using settings and options that apply to an entire set of projects.

  • Use Solution Explorer to help develop and deploy your application.

  • Manage additional files opened outside the context of a solution or project.

Definition Files

Visual Studio stores the definition for a solution in two files: .sln and .suo.

The solution definition file (.sln) stores the metadata that defines your solution:

  • Projects that are associated with the solution.

  • Items available at the solution level that are not associated with a particular project.

  • Solution build configurations that set which project configurations to apply in each type of build.

The metadata stored in the .suo file as you construct a solution and set its properties is used to customize the IDE whenever the solution is active. For example, Solution Explorer displays a Miscellaneous Files folder for a solution if you enable that option, and tools appropriate for the types of projects included in the solution become available from the Toolbox.

Note:

The .sln file can be shared between developers on a development team. The .suo file is a user-specific file, and cannot be shared between developers.