Bagikan melalui


Solution and Project Basics

Visual Studio provides two containers to help you efficiently manage the items that are required by your development effort, such as references, data connections, folders, and files. These containers are called solutions and projects. You use Solution Explorer to view and manage projects and solutions and their associated items.

Solutions

Solutions contain items that you need in order to create your application. A solution includes one or more projects, plus files and metadata that help define the solution as a whole. Visual Studio automatically generates a solution when you create a new project. 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. For more information, see Creating Solutions and Projects.

Projects

Projects are used in a solution to logically manage, build, and debug the items that make up your application. The output of a project is usually an executable program (.exe), a dynamic-link library (.dll) file or a module, among others.

Visual Studio provides several pre-defined project templates. You can use these templates to create the basic project container and a preliminary set of items that you might need in order 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 Default Project Templates in Visual Studio.

Items

Project items can be files, references to libraries, data connections, and folders that are in the project. Some items represent a physical item you can locate in storage. Other items are links and represent pointers to other items that may reside in a service, module, or other component.

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

For more about information, see File Types and File Extensions in Visual Studio and Miscellaneous Files.

See Also

Tasks

How to: Modify Project Properties and Configuration Settings

Concepts

Creating Solutions and Projects

Introduction to Visual Studio Templates

What's New in Visual Studio 2012

Other Resources

Managing Solutions, Projects, and Files