logo search
CSharp_Prog_Guide

Проекты как контейнеры

Чтобы помочь пользователям организовывать и выполнять стандартные задачи с применением разрабатываемых элементов, проекты Visual Studio используются как контейнеры в пределах решения. Это позволяет логически управлять, выполнять построение и отлаживать элементы, образующие приложение. На выходе проект, как правило, представляет собой исполняемую программу (EXE), файл библиотеки динамической компоновки (DLL) или модуль.

Проект может быть простым или сложным в зависимости от конкретных требований. Простой проект может содержать форму или HTML-документ, файлы исходного кода и файл проекта. Более сложные проекты могут включать эти же элементы и, кроме того, сценарии баз данных, хранимые процедуры и ссылки на существующие XML Веб-службы.

Project Templates

All Visual Studio development products provide a number of pre-defined project templates. You can use one of the many project templates to create the basic project container and a preliminary set of items that you might need to develop your application, class, control, or library. For example, if you chose to create a Windows application, the project offers a Windows form item for you to customize. Likewise, if you chose to create a Web application, the project offers a Web form item.

Projects and their templates allow you to concentrate on the specific functionality you want to implement as the project handles common management and build tasks for you. You can work with the default settings provided, or you can customize your build configurations.

Project Files

Each project template creates and maintains a project file to store the metadata specific to that project. This project file is created and maintained for you while you work within the integrated development environment (IDE). The extension for the project file and the actual content is determined by the type of project it defines, so a complete description is not within the scope of this topic.

In general, the project file stores the configuration and build settings you specify for the project and its set of items. Some projects keep a list of the files associated with the project and the location of the file.

When an item is added to a project, the location of its physical source file on disk is also added to the project file. When the link is removed from the project, this information is deleted from the definition file. Each project template determines which commands are available for each item.