Using the Build MenuThe Build menu gives you options for compiling, or building, your project or group of projects in a solution. The options for building items are demonstrated in Figure 2.17. Figure 2.17. Build options in Visual Studio .NET.![]() When you build a solution, you're doing a full build on all items in the solution. A rebuild only builds items that have changed since the last build or rebuild. The Configuration Manager shown in Figure 2.18 enables you to specify the type of build you're performing. If the build is a debug build, a PDB file is created with your output assembly that contains debug information that can be used by the Visual Studio .NET debugger or external debuggers. If you select Release for the build, the debug information won't be created. Figure 2.18. The Configuration Manager.![]() You can create new build configurations from the Configuration Manager dialogConfiguration Manager dialog box. TipOn the Main toolbar, you can switch between the build configurations. A drop-down list has the available build options. Selecting this via the toolbar is quicker than going through the Build Configuration dialog box.Using the Debug MenuOn Day 7, "Exceptions, Debugging, and Tracing," you learn all about the various debugging capabilities in Visual Studio .NET. From the Debug menu, you can get to the multitude of debugging windows, you can start your project with or without debugging, and you can step into and over breakpoints in your project. As in Visual Basic 6, the F5 key runs your applications, and the Ctrl+F5 shortcut runs your application without debugging, meaning the syntax checks are skipped. Figure 2.19 demonstrates the Debug menu and the Breakpoints window pinned to the bottom of the IDE. Figure 2.19. The Debug menu and Breakpoints window.![]() Using the Format MenuThe Format menu was introduced to Visual Basic developers with Visual Basic 5. It was always a standard item in Microsoft Access. In Visual Studio .NET, the Format menu has every option you could ever want for formatting controls on your forms. You can set sizing, spacing, tab order, and alignment from the Format menu. This menu is also available from the Format toolbar. Figure 2.20 demonstrates the Format menu and some of the Make Same Size options. Figure 2.20. Setting size and alignment with the Format menu.![]() Using the Tools MenuThe Tools menu has the remainder of the vast array of tools available in Visual Studio .NET. From the Tools menu, you can do everything from debugging processes to running external applications such as Spy++, which comes with the Enterprise Architect version of Visual Studio .NET. Instead of listing all the available items, take a look at Figure 2.21 to get an idea of the options offered by the Tools menu. Figure 2.21. Options from the Tools menu.![]() In Figure 2.21, you'll notice that Build Comment Web Pages is selected. This is a cool feature that generates HTML pages on the structure of classes, methods, properties, and events in your solution.To test this feature, click the Build Comment Web Pages menu item. When the dialog pops up, simply click the OK button. The comment pages are generated, and should look something like Figure 2.22. Figure 2.22. Build Comment Web Pages results.![]() After the HTML reports are built, you can view the hierarchy of the types in your solution. The files are saved to your hard disk, so they can be distributed to team members who need to know what's going on with a project. This will become a useful tool for both the one-man consultant and the large teams of developers working on projects. You can get a bird's-eye view of your whole project simply by building these comment pages.If you're a C# developer, you can embed custom comments in your code with an XML-like syntax as the following code snippet demonstrates:
The complete list of tags that C# supports for building comment Web pages is as follows:
As long as you prefix the code comment tags with ///, comments are generated in the resulting Build Comment HTML pages. Unfortunately, the built-in functionality for XML comments isn't supported in Visual Basic .NET, but you can find some third-party XML documentation builders for Visual Basic .NET athttp://www.gotdotnet.com/team/vb/andhttp://www.fesersoft.com/products/VBXmlComments/default.asp |