Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Basic knowledge

Finally understand the relationship between the solution and the project


Please the Chinese version for details.Visual Studio provides two types of containers to help you effectively manage the items you need for development work, such as references, data connections, folders, and files. These two types of containers are called solutions and projects. In addition, Visual Studio provides solution folders for organizing related projects into project groups and then performing operations on those project groups. As an interface to view and manage these containers and their associated items, Solution Explorer is part of the Integrated Development Environment (IDE).

 Containers: solutions and projects
 Solutions and projects contain items that represent the references, data connections, folders, and files needed to create the application. A solution can contain multiple projects, and a project usually contains multiple items. These containers allow you to use the IDE in the following ways:

 Manage the settings of the solution as a whole or manage the settings of individual projects.

 While focusing on the items that make up your development work, use Solution Explorer to handle file management details.

 Add items that are useful for multiple projects in the solution or useful for the solution without having to reference the item in each project.

 Handle miscellaneous files that are separate from the solution or project.

 Items: files, references, data connections
 Items can be files and other parts of a project, such as references, data connections, or folders. In Solution Explorer, items can be organized in the following ways:

 As project items (project items are the items that make up a project), such as forms, source files, and classes within a project in Solution Explorer. How it is organized and displayed depends on the project template selected and any modifications made.

 The solution items as files apply to the entire solution and are located in the Solution Items folder in Solution Explorer.

 Miscellaneous files, as files, are not associated with a project or solution and can appear in the Miscellaneous Files folder.

Solution as a container

 Update: November 2007

 To enable the integrated development environment (IDE) to apply its various tools, designers, templates, and settings, Visual Studio implements conceptual containers (called solutions and projects). In addition, Visual Studio provides a solution folder for organizing related projects into groups and then performing operations on those project groups.

 A project contains a set of source files and related metadata, such as component references and build instructions. When you build a project, one or more output files are usually generated. A solution consists of one or more projects, along with files and metadata that help define the solution as a whole:


 When you create a new project, Visual Studio automatically generates a solution. You can then add other projects to the solution as needed. The Solution Explorer provides a graphical view of the entire solution, which helps you manage the projects and files in your solution when developing your application.

 You can also create a blank solution without a project, and use the Visual Studio editor and designer to modify separate files. Solution Explorer provides folders specifically for non-project items

 solution
 The solution manages how Visual Studio configures, builds, and deploys related programs. A Visual Studio solution can consist of just one project, or it can consist of multiple projects jointly produced by the development team. Complex applications may require multiple solutions.

 Use the Solution Build Configuration to specify how different application versions are generated and deployed for specific user groups. For example, you can configure debug versions for developers and testers, and release versions for partners and end users. For further information on creating and using Solution Build Configurations, see Configuration Manager dialog box and Build in Visual Studio.

 advantage
 The solution enables you to focus on developing and deploying a project without considering the specifics of project files, components, and object management. Each Visual Studio solution can be used to:

 Work on multiple projects in the same instance of the IDE.

 Work with items using settings and options that apply to the entire program.

 Use Solution Explorer to help develop and deploy applications.

 Manage other files opened outside the solution or project environment.

 Definition file
Visual Studio stores the definition of the solution in two files: .sln and .suo. In earlier versions of Visual Studio, you may have noticed that there are group files (.vbg) or workspace files (.dsw) in Visual Basic and Visual C ++, respectively.

 A solution definition file (.sln) stores metadata that defines a solution:

 Solution related projects

 Items that are available at the solution level and are not associated with a specific project.

 Solution build configuration that sets the project configuration applied in various build types.

 Whenever a solution is active, customize the IDE with metadata stored in a .suo file when the solution is built and its properties are set. For example, if the Miscellaneous Files option is enabled, Solution Explorer displays a Miscellaneous Files folder for the solution, as well as tools in the Toolbox for the types of projects contained in the solution. Become available.

 Explanation:
.sln files can be shared among developers on the development team. .suo files are user-specific files and cannot be shared between developers.

Items as containers

 Update: November 2007

 To help you organize the items you are developing and perform common tasks, use Visual Studio projects as containers within your 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.


 Depending on your requirements, projects can be simple or complex. A simple project may consist of a form or HTML document, a source code file, and a project file. More complex projects may consist of these items as well as database scripts, stored procedures, and references to existing XML Web services.

 Project template
 All Visual Studio development products provide many predefined project templates. You can use one of these many project templates to create a basic project container and a set of prerequisites that you might need to develop an application, class, control, or library. For example, if you choose to create a Windows application, the project provides you with customizable Windows Forms items. Similarly, if you choose to create a web application, the project will provide a web form item. For more information about project types and templates in your language, see the New Project dialog box.

 The project and its templates allow you to focus on the specific functions you want to implement, as the project handles common management and generation tasks for you. For more information, see Project Items. You can use the provided default settings, or you can customize your own build configuration. For more information, see Build Configuration.

 You can also create your own templates. For more information, see Visual Studio Templates.

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

 Typically, a project file stores the configuration and build settings specified for the project and its collection. Some projects hold a list of files associated with the project and their locations.

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


 The above content is transferred from MSDN. I think that many friends may have built countless projects like me, but every meaning in it is not very clear, so I posted it.

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code