Share via


Projects as Containers

To help you to organize and perform common tasks on the items that you are developing, Visual Studio .NET projects are used as containers within a solution to logically manage, build, and debug the items that comprise you application. The output of a project is usually an executable program (.exe), a dynamic-link library (.dll) file or a module, among others.

A project can be as simple or as complex as you need to meet your requirements. A simple project might consist of a form or HTML document, source code files, and a project file. More complex projects might consist of these items plus database scripts, stored procedures, and a reference to an existing Web service.

Project Templates

All Visual Studio .NET 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. For more information about your language's project types and templates, see New Project Dialog Box.

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. For more information, see Project Items. You can work with the default settings provided, or you can customize your build configurations. For more information, see Build Configurations.

Also, you can create your own templates, for more information see Defining Template Prototypes.

Project Definition Files

Each project template creates and maintains a project file to store the metadata specific to that project. This definition file is created and maintained for you while you work within the integrated development environment (IDE). The extension for the definition 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. Typically, Web projects use both the project file and the project directory to determine the set of items in a project. In Visual Studio .NET, you name a Web project by specifying the location of the project that is a virtual directory on the Web server. The project definition file is updated every time you save the project.

When an item is added to a project, the location of its physical source file on disk is also added to the definition file for the project. 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. For more information, see Item Management in Projects.

See Also

Project Properties | Properties Window | <Projectname> Property Pages Dialog Box | Setting Visual Basic Project Properties | Default and Custom Builds