The Visual Studio IDE
- Installing Visual Studio
- Getting Started
- Creating Your First Project
- Navigating the IDE
- Managing the Many Windows of the IDE
- Summary
When you're traveling over new ground, it's often wise to consult a guide. At a minimum, a quick check of the map is in order before you set out for new adventures. The same holds true for approaching a new development tool the size and breadth of Visual Studio 2010. It is wise to familiarize yourself a bit with the tool before starting that first project off on the wrong foot.
This chapter is your quick, to-the-point guide. It serves to orient you before you set out. We cover the basics of installation; configuration; booting up the IDE; and getting to know the layout of the tool in terms of projects, menus, tools, editors, and designers. Let's get started.
Installing Visual Studio
The installation of Visual Studio 2010 remains similar to that of previous versions. The application plays host to many tools. Depending on your purchase, a subset of these items are available during install (see Chapter 1, "A Quick Tour of Visual Studio 2010," for a comparison of Visual Studio editions). If you are fortunate enough to own the Team Suite Edition, you are presented with the full set of options for installation. For those with Visual Studio Professional, however, you choose one or more development languages, determine if you want to install unit testing, decide if you need the features of Microsoft Office Development, and perhaps install SQL 2008 Express. Figure 2.1 shows the setup options selection dialog box for Visual Studio Professional.
Figure 2.1 Visual Studio 2010 Setup Options page.
Choosing a Language
Setting up your development machine should be relatively straightforward. We suggest that most developers keep language installs to a primary language and perhaps one backup. You might use a secondary language for viewing sample code from MSDN or similar sites. Typically, this means if your primary language is Visual Basic, you install C# as a secondary language (and vice versa). Choosing to install many languages, most of which you do not intend to use, not only takes up hard drive space, but also can clutter your environment with too many choices. Having a backup language, however, helps solve the problem of finding a great bit of code you want to learn more about only to discover you can't give it a test run because it is not available in your chosen language.
Whether or not to install the additional tools is entirely up to you (and the projects you will be working on). For example, if you intend to work with a lot of local database code, you want SQL Server 2008 Express. If your project requires you to unit test your code then you should be sure to install the Unit Testing Tools.
Configuring Your Development Environment Settings
Booting the new IDE for the first time results in a dialog box asking you to choose your environment settings. As Visual Studio becomes the central tool for so many developers, testers, architects, and even project managers, it's harder and harder to satisfy them all with a single tool. To aid in this dilemma, Microsoft has created an entire set of environment settings that are configured for the usual developer type. For instance, if you set your environment to C#, the New Project dialog box automatically highlights C# projects above other languages. Figure 2.2 shows the available environment settings options.
Figure 2.2 The Environment Settings options dialog box.
Managing Your Settings
Only your first use of Visual Studio launches the default settings dialog box. On subsequent visits, you go straight to the tool. However, you might consider switching your environment settings if you do a lot of switching from one language to another or if you switch roles. For example, C# developers might use the C# development settings most of the time. They might then toggle to another collection of settings when switching to VB or developing a Web-only application.
You manage your environment settings from the Tools menu's Import and Export Settings option. Figure 2.3 shows the first screen in this wizard. This screen enables you to choose to execute a settings export, import, or total reset.
Figure 2.3 The Import and Export Settings Wizard.
You can choose from several setting collections when importing. There are a few default collections, including those based on language and role (such as web developer or tester in the case of Team Systems). In addition, you can select a custom settings file. Figure 2.4 shows the import settings collection options.
Figure 2.4 Choosing a collection of settings for import.
Another key screen to the Import and Export Settings Wizard is the settings selection screen. On this screen, you decide which options are important for export or import. This enables you to pick and choose settings you plan to either export or import. For example, you might love the way a friend has configured her code editor in terms of font and contrasting colors, but you do not want all her other settings, such as her keyboard configurations. You can accomplish this by selecting to import only her code editor settings. Figure 2.5 provides a glimpse at the granular level to which you can manage your environment settings during import and export.
Figure 2.5 Choosing settings to export.
By default, settings are exported to your documents folder. In Windows 7, you typically find this folder at C:\Users\[user]\Documents\Visual Studio 10\Settings. Here you can find a .vssettings XML file representing the many settings for your instance of Visual Studio. This includes CurrentSettings.vssettings and any exported settings files. The .vssettings files can be shared among users. They can also be used to migrate settings from one PC and one IDE version to another. You do so through the Import and Export Settings Wizard.