Visual C# Express - Managing Solution and Projects

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
Visual C# Express
edit
Visual C# Express: Managing Solution and Projects

The solution explorer is the place to add new objects to your project, remove objects or even add a new project to the solution.

Adding an item to a project

To add a class to a project, you can either use the menu system or the solution explorer. To use the menu system, select Add Class... from the Project menu or use the keyboard shortcut Shift+Alt+C. To add a class using the solution explorer, right-click on the project that you wish to add the class to, select Add from the menu and the click on Class (as shown in Figure 12). The Add New Item menu will be displayed with the default name of class1.cs in the file name.


Image:02-addclass.jpg

Figure 12: Visual C# Express - Adding a Class to a Project

The Add sub-menu in the solution explorer also allows you to add other items to your application including items that already exist. When you add an existing item, it does not have to be in the same folder as your application. By adding the item, the IDE makes a copy of the code in the working folder of the application.

Adding a Form or Control to a project is either done via the Project menu or by right-clicking on the project. There is no keyboard shortcut associated with this action.

Adding a project to a solution

To add an existing or new project to a solution, simply right-click on the solution (as shown in Figure 13), then select Add from the menu followed by either New Project... or Existing Project....


Image:02-addproject.jpg

Figure 13: Visual C# Express - Adding a Project to a Solution

Changing the startup project in a solution

To change which project in a solution is the startup project, simply right-click on the project that you wish to be the startup one, then select Set as StartUp Project.


Previous_Page_.gif Next_Page_.gif

Personal tools