Поделиться через


Solution Items

As a container, a solution can track several types of items. For example, projects are within a solution. However, you might have items that you want to manage independently of a project, but in association with a solution. These items are considered solution items and are displayed in the Solution Items folder of Solution Explorer. Solution Items are always available from Solution Explorer when you open the solution.

Solution Items are Project Independent

Project Solutions

The items in the Solution Items folder are project-independent files you create in addition to your project files. These items represent files that are integral to the development of your projects but do not belong to a particular project.

Cascading style sheets are common solution items. A single style sheet for example, can standardize the formatting of numerous Web pages in multiple projects. When the solution is closed, the style sheet stays with its Web pages. When the solution is re-opened, the style sheet appears beneath the Solution Explorer Solution Items node in Solution Explorer.

Project files that appear in Solution Explorer beneath the project to which they are added are included in project or solution builds. Solution files that appear in the Solution Items folder are not built.

You can use source control with solution items as well as projects and project files. Solution items are integral to the projects in a solution. Although they are managed as links and you can save them to any location, you might want to save them in the solution directory. The solution file (.sln) remembers and more importantly tracks, the location of its solution items.

See Also

Tasks

How to: Create Directories for Solutions

How to: Add and Remove Solution Items

Concepts

Solutions as Containers

Miscellaneous Files

Other Resources

Solution Explorer