Professional Visual Studio 2010

( 1 )

Overview

A must-have guide that covers all the new features of Visual Studio 2010

Visual Studio allows you to create and manage programming projects for the Windows platform, and the new 2010 version has undergone a major overhaul comprised of significant changes. Written by an author team of veteran programmers and developers, Professional Visual Studio 2010 gets you quickly up to speed on what you can expect from the newest version of Visual Studio.

...

See more details below
Paperback
$31.79
BN.com price
(Save 36%)$49.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (16) from $2.63   
  • New (7) from $27.92   
  • Used (9) from $2.63   

Overview

A must-have guide that covers all the new features of Visual Studio 2010

Visual Studio allows you to create and manage programming projects for the Windows platform, and the new 2010 version has undergone a major overhaul comprised of significant changes. Written by an author team of veteran programmers and developers, Professional Visual Studio 2010 gets you quickly up to speed on what you can expect from the newest version of Visual Studio.

This book's first section is dedicated to familiarizing you with the core aspects of Visual Studio 2010. Everything you need is contained in the first five chapters, from the IDE structure and layout to the various options and settings you can change to make the user interface synchronize with your own way of doing things.

From there, the remainder of the book is broken into 11 parts:

  • Getting Started: In this part, you learn how to take control of your projects and organize them in ways that work with your own style.
  • Digging Deeper: Though the many graphical components of Visual Studio that make a programmer's job easier are discussed in many places throughout this book, you often need help when you're in the process of actually writing code. This part deals with features that support the coding of applications such as IntelliSense, code refactoring, and creating and running unit tests In the latest version of the .NET framework, enhancements were added to support dynamic languages and move towards feature parity between the two primary .NET languages, C# and VB. This part covers changes to these languages, as well as looking at a range of features that will help you write better and more consistent code.
  • Rich Client and Web Applications: For support building everything from Office add-ins to cloud applications, Visual Studio enables you to develop applications for a wide range of platforms. These two parts cover the application platforms that are supported within Visual Studio 2010, including ASP.NET and Office, WPF, Silverlight 2 and ASP.NET MVC.
  • Data: A large proportion of applications use some form of data storage. Visual Studio 2010 and the .NET Framework include strong support for working with databases and other data sources. This part examines how to use DataSets, the Visual Database Tools, LINQ, Synchronization Services and ADO.NET Entity Framework to build applications that work with data. It also shows you how you can then present this data using Reporting.
  • Application Services: Through the course of building an application you are likely to require access to services that may or may not reside within your organization. This part covers core technologies such as WCF, WF, Synchronization Services and WCF RIA services that you can use to connect to these services.
  • Configuration and Internationalization: The built-in support for configuration files allows you to adjust the way an application functions on the fly without having to rebuild it. Furthermore, resource files can be used to both access static data and easily localize an application into foreign languages and cultures. This part of the book shows how to use .NET configuration and resource files.
  • Debugging: Application debugging is one of the more challenging tasks developers have to tackle, but correct use of the Visual Studio 2010 debugging features will help you analyze the state of the application and determine the cause of any bugs. This part examines the rich debugging support provided by the IDE.
  • Build and Deployment: In addition to discussing how to build your solutions effectively and getting applications into the hands of your end users, this part also deals with the process of upgrading your projects from previous versions.
  • Customizing and Extending Visual Studio: If the functionality found in the previous part isn't enough to help you in your coding efforts, Microsoft has made Visual Studio 2010 even more extensible. This part covers the automation model, how to write add-ins and macros, and then how to use a new extensibility framework, MEF, to extend Visual Studio 2010.
  • Visual Studio Ultimate: The final part of the book examines the additional features only available in the Premium and Ultimate versions of Visual Studio 2010. In addition, you'll also learn how the Team Foundation Server provides an essential tool for managing software projects.

Though this breakdown of the Visual Studio feature set provides the most logical and easily understood set of topics, you may need to look for specific functions that will aid you in a particular activity. To address this need, references to appropriate chapters are provided whenever a feature is covered in more detail elsewhere in the book.

Professional Visual Studio 2010 is for all developers new to Visual Studio as well as those programmers who have some experience but want to learn about features they may have previously overlooked.

If you are familiar with the way previous versions of Visual Studio worked, you may want to skim over Part I, which deals with the basic constructs that make up the user interface, and move on to the remainder of the book where the new features found in Visual Studio 2010 are discussed in detail. While you may be familiar with most of Part I, it is worth reading this section in case there are features of Visual Studio 2010 that you haven't seen or used before.

If you're just starting out, you'll greatly benefit from the first part, where basic concepts are explained and you're introduced to the user interface and how to customize it to suit your own style.

Read More Show Less

Product Details

  • ISBN-13: 9780470548653
  • Publisher: Wiley
  • Publication date: 5/3/2010
  • Edition number: 1
  • Pages: 1224
  • Sales rank: 330,326
  • Product dimensions: 7.40 (w) x 9.40 (h) x 2.34 (d)

Meet the Author

Nick Randolph is a Microsoft MVP, owns a mobile specialist development company, Built to Roam, and is an active blogger on the Professional Visual Studio web site (www.professionalvisualstudio.com).

David Gardner is the Chief Software Architect at Intilecta Corporation and a regular blogger on the Professional Visual Studio web site (www.professionalvisualstudio.com).

Michael Minutillo is a senior .NET developer for Beacon Technology Pty Ltd and currently leads the Perth ALT.NET user group.

Chris Anderson is a consultant who specializes in .NET programming.

Read More Show Less

Read an Excerpt

Professional Visual Studio 2010


By Nick Randolph David Gardner Chris Anderson Michael Minutillo

John Wiley & Sons

Copyright © 2010 John Wiley & Sons, Ltd
All right reserved.

ISBN: 978-0-470-54865-3


Chapter One

A Quick Tour

WHAT'S IN THIS CHAPTER?

* Installing and getting started with Visual Studio 2010

* Creating and running your first application

* Debugging and deploying an application

Ever since we have been developing software, there has been a need for tools to help us write, compile, debug, and deploy our applications. Microsoft Visual Studio 2010 is the next iteration in the continual evolution of a best-of-breed integrated development environment (IDE).

This chapter introduces the Visual Studio 2010 user experience and shows you how to work with the various menus, toolbars, and windows. It serves as a quick tour of the IDE, and as such it doesn't go into detail about what settings can be changed or how to go about customizing the layout, because these topics are explored in the following chapters.

GETTING STARTED

With each iteration of the Visual Studio product, the installation process has been incrementally improved, meaning that you can now get up and running with Visual Studio 2010 with minimal fuss. This section walks you through the installation process and getting started with the IDE.

Installing Visual Studio 2010

When you launch Visual Studio 2010 setup, you see the dialog in Figure 1-1 showing you the three product installation stages. As you would imagine, the first stage is to install the product itself. The other two stages are optional. You can either install the product documentation locally, or use the online (and typically more up-to-date) version. It is recommended that you do search for service releases because it ensures you are working with the most recent version of the product and associated tools.

As you progress through the setup process you are prompted to provide feedback to Microsoft (left image, Figure 1-2) and agree to the licensing terms for the product (right image, Figure 1-2).

The Visual Studio 2010 setup process has been optimized for two general categories of developers: those writing managed, or .NET, applications, and those writing native, or C++, applications (left image, Figure 1-3). The Customize button allows you to select components from the full component tree as shown in the right image of Figure 1-3.

Once you have selected the components you want to install, you see the updated progress dialog in the left image of Figure 1-4. Depending on which components you already have installed on your computer, you may be prompted to restart your computer midway through the installation process. When all the components have been installed, you see the setup summary dialog in the right image of Figure 1-4. You should review this to ensure that no errors were encountered during installation.

Running Visual Studio 2010

When you launch Visual Studio the Microsoft Visual Studio 2010 splash screen appears. Like a lot of splash screens, it provides information about the version of the product and to whom it has been licensed, as shown in Figure 1-5.

An interesting fact about the splash screen is that while a large portion of Visual Studio now uses WPF to display its content, the new splash screen in Visual Studio 2010 is still done in native code so that it displays as soon as possible after you start Visual Studio. A significant amount of time went into hand crafting the wave at the bottom of the splash screen, so make sure you marvel at it whenever you're sitting there patiently waiting for Visual Studio to load.

The first time you run Visual Studio 2010, you see the splash screen only for a short period before you are prompted to select the default environment settings. It may seem unusual to ask those who haven't used a product before how they imagine themselves using it. Because Microsoft has consolidated a number of languages and technologies into a single IDE, that IDE must account for the subtle (and sometimes not so subtle) differences in the way developers work.

If you take a moment to review the various options in this list, as shown in Figure 1-6, you'll find that the environment settings that are affected include the position and visibility of various windows, menus, and toolbars, and even keyboard shortcuts. For example, if you select the General Development Settings option as your default preference, this screen describes the changes that will be applied. Chapter 3 covers how you can change your default environment settings at a later stage.

A tip for Visual Basic .NET developers coming from previous versions of Visual Studio is that they should not use the Visual Basic Development Settings option. This option has been configured for VB6 developers and will only infuriate Visual Basic .NET developers, because they will be used to different shortcut key mappings. We recommend that you use the general development settings, because these will use the standard keyboard mappings without being geared toward another development language.

THE VISUAL STUDIO IDE

Depending on which set of environment settings you select, when you click the Start Visual Studio button you will most likely see a dialog indicating that Visual Studio is configuring the development environment. When this process is complete, Visual Studio 2010 opens, ready for you to start work, as shown in Figure 1-7.

Regardless of the environment settings you selected, you see the Start Page in the center of the screen. However, the contents of the Start Page and the surrounding toolbars and tool windows can vary.

If you click the grey rounded rectangle with the text "Download the latest information for developers to the Start Page," this pulls down news items from an RSS feed specified in the environment settings you specified. Each item is displayed in summary within the rectangle, allowing you to click through to the full article. You can customize this feed by changing the Start Page News Channel property on the Environment -> Startup node of the Options dialog, accessible via the Options item on the Tools menu.

Before you launch into building your first application, it's important to take a step back and look at the components that make up the Visual Studio 2010 IDE. Menus and toolbars are positioned along the top of the environment, and a selection of subwindows, or panes, appears on the left, right, and bottom of the main window area. In the center is the main editor space: whenever you open a code file, an XML document, a form, or some other file, it appears in this space for editing. With each file you open, a new tab is created so that you can toggle among opened files.

On either side of the editor space is a set of tool windows: these areas provide additional contextual information and functionality. In the case of the general developer settings, the default layout includes the Solution Explorer and Class View on the right, and the Server Explorer and Toolbox on the left. The tool windows on the left are in their collapsed, or unpinned, state. If you click a tool window's title, it expands; it collapses again when it no longer has focus or you move the cursor to another area of the screen. When a tool window is expanded, you see a series of three icons at the top right of the window, similar to those shown in the left image of Figure 1-8.

If you want the tool window to remain in its expanded, or pinned, state, you can click the middle icon, which looks like a pin. The pin rotates 90 degrees to indicate that the window is now pinned. Clicking the third icon, the X, closes the window. If later you want to reopen this or another tool window, you can select it from the View menu.

Some tool windows are not accessible via the View menu; for example, those having to do with debugging, such as threads and watch windows. In most cases these windows are available via an alternative menu item; in the case of the debugging windows, it is the Debug menu.

The right image in Figure 1-8 shows the context menu that appears when the first icon, the down arrow, is clicked. Each item in this list represents a different way of arranging the tool window. As you would imagine, the Float option allows the tool window to be placed anywhere on the screen, independent of the main IDE window. This is useful if you have multiple screens, because you can move the various tool windows onto the additional screen, allowing the editor space to use the maximum screen real estate. Selecting the Dock as Tabbed Document option makes the tool window into an additional tab in the editor space. In Chapter 4, you learn how to effectively manage the workspace by docking and pinning tool windows.

Developing, Building, Debugging, and Deploying Your First Application

Now that you have seen an overview of the Visual Studio 2010 IDE, this section walks through creating a simple application that demonstrates working with some of these components. This is, of course, the mandatory "Hello World" sample that every developer needs to know, and it can be done in either Visual Basic .NET or C#, depending on what you feel more comfortable with.

1. Start by selecting File -> New -> Project. This opens the New Project dialog, as shown in Figure 1-9. If you have worked with earlier versions of Visual Studio you will notice that this dialog has had a significant facelift. There is still the tree on the left side of the dialog for grouping templates based on language and technology, but now there is also a search box in the top-right corner. The right pane of this dialog displays additional information about the project template you have selected. Lastly, you can select the version of the .NET Framework that the application will target using the drop-down at the top of the dialog.

Select the WPF Application from the Templates area (this item exists under the root Visual Basic and Visual C# nodes, or under the sub-node Windows) and set the Name to GettingStarted, before selecting OK. This should create a new WPF application project, which includes a single startup window and is contained within a GettingStarted solution, as shown in the Solution Explorer window of Figure 1-10. This startup window has automatically opened in the visual designer, giving you a graphical representation of what the window will look like when you run the application. You will notice that the Properties tool window has appeared at the bottom of the right tool windows area.

2. Click the Toolbox tool window, which causes the window to expand, followed by the pin icon, which pins the tool window open. To add controls to the window, select the appropriate items from the Toolbox and drag them onto the form. Alternatively, you can double-click the item and Visual Studio automatically adds them to the window.

3. Add a button and textbox to the form so that the layout looks similar to the one shown in Figure 1-11. Select the textbox and select the Properties tool window (you can press F4 to automatically open the Properties tool window). Change the name of the control to txtToSay. Repeat for the Button control, naming it btnSayHello and setting the Content property to Say Hello!

You can quickly locate a property by typing its name into the search field located beneath the Name field. In Figure 1-11 "Conten" has been entered in order to reduce the list of Properties so that it's easier to locate the Content property.

You will also notice that after you add controls to the window, the tab is updated with an asterisk (*) after the text to indicate that there are unsaved changes to that particular item. If you attempt to close this item while changes are pending, you are asked if you want to save the changes. When you build the application, any unsaved files are automatically saved as part of the build process.

One thing to be aware of is that some files, such as the solution file, are modified when you make changes within Visual Studio 2010 without your being given any indication that they have changed. If you try to exit the application or close the solution, you are still prompted to save these changes.

4. Deselect all controls and then double-click the button. This not only opens the code editor with the code-behind file for this form, it also creates and wires up an event handler for the click event on the button. Figure 1-12 shows the code window after a single line has been added to echo the message to the user.

5. Before you build and execute your application, place the cursor somewhere on the line containing Messagebox.Show and press F9. This sets a breakpoint - when you run the application by pressing F5 and then click the "Say Hello!" button, the execution halts at this line. Figure 1-13 illustrates this breakpoint being reached. The data tip, which appears when the mouse hovers over the line, shows the contents of the txtToSay.Text property.

The layout of Visual Studio in Figure 1-13 is significantly different from the previous screenshots, because a number of new tool windows are visible in the lower half of the screen, and new command bars are visible at the top. When you stop the application you will notice that Visual Studio returns to the previous layout. Visual Studio 2010 maintains two separate layouts: design time and run time. Menus, toolbars, and various windows have default layouts for when you are editing a project, whereas a different setup is defined for when a project is being executed and debugged. You can modify each of these layouts to suit your own style and Visual Studio 2010 will remember them.

6. The last step is to deploy your application. Whether you're building a rich client application using Windows Forms or WPF, or a web application, Visual Studio 2010 has the ability to publish your application. Double-click the Properties node in Solution Explorer and select the Publish node to display the options for publishing your application, as shown in Figure 1-14.

In Figure 1-14, the publishing folder has been set to a local path, but you can specify a network folder, an IIS folder, or an FTP site instead. Once you have specified where you want to publish to, clicking Publish Now publishes your application to that location.

SUMMARY

You've now seen how the various components of Visual Studio 2010 work together to build an application. The following list outlines the typical process of creating a solution:

1. Use the File menu to create a solution.

2. Use the Solution Explorer to locate the window that needs editing and double-click the item to show it in the main workspace area.

3. Drag the necessary components onto the window from the Toolbox.

4. Select the window and each component in turn, and edit the properties in the Properties window.

5. Double-click the window or a control to access the code behind the component's graphical interface.

6. Use the main workspace area to write code and design the graphical interface, switching between the two via the tabs at the top of the area.

7. Use the toolbars to start the program.

8. If errors occur, review them in the Error List and Output windows.

9. Save the project using either toolbar or menu commands, and exit Visual Studio 2010.

In subsequent chapters, you learn how to customize the IDE to more closely fit your own working style, and how Visual Studio 2010 takes a lot of the guesswork out of the application development process. You also see a number of best practices for working with Visual Studio 2010 that you can reuse as a developer.

(Continues...)



Excerpted from Professional Visual Studio 2010 by Nick Randolph David Gardner Chris Anderson Michael Minutillo Copyright © 2010 by John Wiley & Sons, Ltd. Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

INTRODUCTION.

CHAPTER 1 A Quick Tour.

CHAPTER 2 The Solution Explorer, Toolbox, and Properties.

CHAPTER 3 Options and Customizations.

CHAPTER 4 The Visual Studio Workspace.

CHAPTER 5 Find and Replace and Help.

CHAPTER 6 Solutions, Projects, and Items.

CHAPTER 7 IntelliSense and Bookmarks.

CHAPTER 8 Code Snippets and Refactoring.

CHAPTER 9 Server Explorer.

CHAPTER 10 Modeling with the Class Designer.

CHAPTER 11 Unit Testing.

CHAPTER 12 Documentation with XML Comments.

CHAPTER 13 Code Consistency Tools.

CHAPTER 14 Code Generation with T4.

CHAPTER 15 Project and Item Templates.

CHAPTER 16 Language-Specifi c Features.

CHAPTER 17 Windows Forms Applications.

CHAPTER 18 Windows Presentation Foundation (WPF).

CHAPTER 19 Offi ce Business Applications.

CHAPTER 20 ASP.NET Web Forms.

CHAPTER 21 ASP.NET MVC.

CHAPTER 22 Silverlight.

CHAPTER 23 Dynamic Data.

CHAPTER 24 SharePoint.

CHAPTER 25 Windows Azure.

CHAPTER 26 Visual Database Tools.

CHAPTER 27 DataSets and DataBinding.

CHAPTER 28 Language Integrated Queries (LINQ).

CHAPTER 29 The ADO.NET Entity Framework.

CHAPTER 30 Reporting.

CHAPTER 31 Windows Communication Foundation (WCF).

CHAPTER 32 Windows Workfl ow Foundation (WF).

CHAPTER 33 Client Application Services.

CHAPTER 34 Synchronization Services.

CHAPTER 35 WCF RIA Services.

CHAPTER 36 Confi guration Files.

CHAPTER 37 Connection Strings.

CHAPTER 38 Resource Files.

CHAPTER 39 Using the Debugging Windows.

CHAPTER 40 Debugging with Breakpoints.

CHAPTER 41 DataTips, Debug Proxies, and Visualizers.

CHAPTER 42 Debugging Web Applications.

CHAPTER 43 Advanced Debugging Techniques.

CHAPTER 44 Upgrading with Visual Studio 2010.

CHAPTER 45 Build Customization.

CHAPTER 46 Assembly Versioning and Signing.

CHAPTER 47 Obfuscation, Application Monitoring, and Management.

CHAPTER 48 Packaging and Deployment.

CHAPTER 49 Web Application Deployment.

CHAPTER 50 The Automation Model.

CHAPTER 51 Add-Ins.

CHAPTER 52 Macros.

CHAPTER 53 Managed Extensibility Framework (MEF).

CHAPTER 54 Visual Studio Ultimate for Architects.

CHAPTER 55 Visual Studio Ultimate for Developers.

CHAPTER 56 Visual Studio Ultimate for Testers.

CHAPTER 57 Team Foundation Server.

INDEX .

Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star

(1)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted November 3, 2010

    No text was provided for this review.

Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)