C# Tutorial - Solutions and ProjectsBefore we get started developing our first application, an understanding of the differences between a solution and a project is required. A project holds source files and any other files, such as images, that are needed to create an assembly that is to be run by the .NET Common Language Runtime. All of the source files in a project are compiled together to create a single assembly. The assembly may be an executable (.exe) or a dynamic link library (.dll). A solution can hold one or more projects, but often contains just a single project. If this is the case, then there is really no difference between a solution and a project. A solution that contains more than one project is suitable for large applications that are developed by more than one person. This allows individuals or small groups of developers to independently work on the projects that make up the solution. When you open a project, the IDE automatically opens the solution that it is a part of. Similarly, when you open a solution, the IDE automatically opens all of the projects that are located in the solution. A solution may contain projects that are written in more than one .NET supported language, although C# Express does not give you the ability to do this. File Types
How to create a new projectTo create a new project, either click on the new projects label in the Recent Projects window or choose New Project from the File menu. Alternatively you can use the keyboard shortcut by pressing the control, shift and ‘N’ keys at the same time. This latter method is one of a number of keyboard shortcuts that are available in the Integrated Development Environment and are shown in the following manner; How to open and close existing projectsTo open a project, either click on a recent project on the Start page, or choose Open Project… from the File menu. Alternatively, the keyboard shortcut is; To close a project, you actually need to close the solution that it is a part of. To do this, choose Close Solution from the File menu. This may seem confusing that we refer to closing a project, by clicking on the Close Solution menu item, but remember that by closing the solution, we are also closing all of the projects within it. There is no shortcut associated with closing a project, however if you wish to close the whole application then this can be achieved using; The Open Project Dialog![]()
|