Working with Solutions and Projects

   

One of the most notable changes in Visual Studio .NET from previous versions is how projects are managed and organized. Previous versions of Visual Studio allowed you to add several projects to a workspace, but they all had to be independent projects and written in Visual C++.

Visual Studio .NET, however, recognizes several project types, including Visual Basic and C#, all of which can be mixed within what is known as a solution. A solution is a replacement for the workspace and does not have a bias for one language or another. Several projects can be loaded and navigated with the Solution Explorer window, shown in Figure 1.7.

Figure 1.7. Solution Explorer in Visual Studio .NET.

graphics/01fig07.jpg

The solution shown in Figure 1.7 actually contains five different projects and a miscellaneous file. The five projects include a Web service written in VB .NET, a Web site written in ASP.NET with C#, a couple of Visual C++ projects, and a Web Setup Windows Installer project.

By using a single command, Ctrl+Shift+B, or the menu item Build, Build Solution, all the projects in the solution are built with the appropriate compilers. Dependencies between the projects are taken into account in deciding the order of the build process.

All solution settings, including the addition of another project to a solution, are done through the Solution Explorer. By selecting a project in a solution, you can adjust that project's settings. Selecting the solution and displaying its properties allows you to change the solution configuration. You can also add existing solutions and projects to a solution or create a new project in the solution. Adding one solution to another causes a merge of all the projects contained in the selected solution into the current solution.


   
Top


Sams Teach Yourself Visual C++. NET in 24 Hours
Sams Teach Yourself Visual C++.NET in 24 Hours
ISBN: 0672323230
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net