Visual Studio 2010 Product Highlights
This topic contains information about some of the important enhancements in Visual Studio 2010.
Visual Studio IDE Improvements
The following sections describe improvements to the Visual Studio IDE.
New Appearance and Behavior
The following illustration shows the Visual Studio integrated development environment (IDE).
Visual Studio IDE
The IDE has been redesigned for improved readability. Unnecessary lines and gradients have been removed to reduce clutter.
Support for multiple monitors
Document windows such as the Code Editor and the Design view window can now be placed outside the IDE window. For example, you can drag the Code Editor out of the IDE so that you can view it and the Design view window side by side.
Tools to Help You Quickly Explore Code
The new Code Editor makes code easier to read. You can zoom in on text by pressing CTRL and scrolling with the mouse wheel. Also, when you click a symbol in Visual C# or Visual Basic, all instances of that symbol are automatically highlighted. For more information, see What's New in the Visual Studio 2010 Editor.
Search-As You Type
The new Navigate To feature provides search-as-you-type support for files, types, and members. Navigate To enables you to take advantage of Camel casing and underscores to abbreviate your search text. For example, you can use "AOH" to search for "AddOrderHeader." For more information, see How to: Search for Objects, Definitions, and References (Symbols).
In Visual C# and Visual C++, Call Hierarchy enables you to navigate from a member to the members that call it and to the members that it calls. This is useful for exploring object-oriented code. For more information, see Call Hierarchy.
A redesigned Threads window provides filtering, call-stack searching and expansion, and grouping. Also, you can now organize and search breakpoints and share them with other developers. For more information, see What's New in the Visual Studio Debugger.
The new Parallel Stacks and Parallel Tasks windows help you to visualize and debug parallel code that is written in C++, C#, or Visual Basic. For more information, see Using the Parallel Stacks Window and Using the Parallel Tasks Window.
IDE Features Correspond to Project Capabilities
Features in the IDE, such as Add Reference and the Toolbox, now correspond to the version of the .NET Framework or Silverlight that your project targets. As a result, types, members, and controls from assemblies that target an earlier version of the .NET Framework do not appear in IntelliSense and produce background compilation errors. For example, if your project targets .NET Framework 2.0 and you use a language feature that .NET Framework 2.0 does not support, such as anonymous types, the IDE will mark the code as an error. For more information, see Targeting a Specific .NET Framework Version or Profile.
In Visual Basic or Visual C#, the IDE can now generate code stubs for new types and members from their usage before they have been defined. As a result, you can write tests first, and then generate the code that is required to compile the tests. Additionally, IntelliSense now provides a suggestion mode that prevents IntelliSense from automatically completing a type or member that has not yet been defined. For more information, see Generate From Usage and List Members.
Application Lifecycle Management
The Application Lifecycle Management client application is now available in all versions of Visual Studio (excluding Express versions). Application Lifecycle Management includes version control, work item tracking, build automation, a team portal, reporting and business intelligence, Agile Planning Workbooks, and test case management—everything that you need to collaborate on your software development projects. Application Lifecycle Management is included in Visual Studio 2010 with one Client Access License (CAL). You can purchase additional Client Access Licenses as needed. For more information, see What's New for Application Lifecycle Management in Visual Studio 2010.
Code Generation and Text Templates
Text templates can be created and used in any version of Visual Studio, without the need for any other component. Generating any kind of text file from your application has been made easier in Visual Studio 2010 with the introduction of Preprocessed Text Templates. Support for code generation has also been improved through better integration with the build system, so that your generated source code is always up to date after any change to the source model. For more information, see Code Generation and T4 Text Templates.
The Visual Studio 2010 Start Page features a new look and new functionality. A tabbed content area links to a variety of selected and categorized learning resources. This includes MSDN resources, community resources, and a customizable news feed. An improved Recent Projects list lets you add projects to the list or remove them with a single mouse click. You can also install custom Start Pages from Extension Manager. For more information about the Start Page, see Start Page.
You can find and install Visual Studio extensions from the IDE by clicking Extension Manager on the Tools menu. Extension Manager downloads and installs community-published extensions from the Visual Studio Gallery Web site without requiring that you open a browser. It also enables you to uninstall, disable, or re-enable installed extensions. For more information, see Installing and Managing Visual Studio Tools and Extensions.
New Project Dialog Box
The New Project dialog box in Visual Studio 2010 includes the same search and install capabilities as the Extension Manager, except that it searches only for project templates and item templates. For more information, see How to: Find and Install Templates Located Online.
New Help Viewer
The Help Viewer has been completely redesigned for Visual Studio 2010. You can view documentation online or offline by using your preferred Web browser, download the latest documentation on demand, navigate the documentation by using a simplified table of contents, search for specific content by using an improved full-text search algorithm, and use a more streamlined F1 system to locate content specific to the task that you are working on. For more information, see Microsoft Help System 1.1 Documentation.
Visual Basic and C# Languages
In Visual Studio 2010, the Visual Basic and C# languages continue to move toward feature parity. This enables you to choose a language based on personal preferences because both languages are equally capable. This section lists some of the new features in C# and Visual Basic.
Visual Basic Language
Visual Basic has new features that shorten syntax and enable you to write code faster. These features include auto-implemented properties, implicit line continuation, collection initializers, and single- and multi-statement lamdba expressions. Additionally, Visual Basic now supports simplified deployment through type equivalence. For more information, see What's New in Visual Basic 2010.
The new features in the C# language work together to simplify programming with the Microsoft Office APIs. With named and optional arguments, you no longer have to specify values for every optional parameter when you call COM methods. With dynamic support, you can reference any object, such as return values from COM APIs or dynamic languages, without using an explicit type cast. Indexed properties and optional ref modifiers facilitate access to COM interfaces. Also, type equivalence support simplifies deployment by embedding types from primary interop assemblies (PIAs) directly in your assembly. For more information, see What's New in Visual C# 2010.
Visual Studio 2010 includes F#, a new .NET Framework language that supports functional programming and traditional object-oriented and imperative (procedural) programming. F# combines the succinct, expressive, and compositional style of functional programming with the runtime, libraries, interoperability, and object model of the .NET Framework. In other words, you get the best of both paradigms. For more information, see Visual F#.
Visual Studio 2010 includes project templates and tools that you can use to create solutions that extend Microsoft Office 2010 and the 2007 Microsoft Office system. You can take advantage of new development features for Office projects, such as expanded Ribbon Designer support for Microsoft Office 2010 applications and the ability to create Office solutions that do not require the Office primary interop assemblies on end user computers. You can also use new deployment features in Office projects, such as the ability to deploy Office solutions to all users on a computer. For more information, see Office Development in Visual Studio and What's New in Office Development.
Data Access and Modeling
.NET Framework 4 includes enhancements to the ADO.NET Entity Framework that further decrease the amount of coding and maintenance required for data-driven applications. In Visual Studio 2010, improved flexibility and customization options in the ADO.NET Entity Data Model Tools make it easier to create Entity Framework applications. For more information, see ADO.NET Entity Framework and ADO.NET Entity Data Model Tools.
Visual Studio 2010 includes improvements that speed up code authoring, simplify Web deployment, and more.
Faster Code Authoring
Visual Studio 2010 includes Code Snippets for HTML, JScript, and ASP.NET controls to help you write code faster. You can insert snippets from the Code Snippets Manager or directly from IntelliSense.
Dramatically Improved IntelliSense for JScript
IntelliSense now parses 2 to 5 times faster, so there is virtually no processing delay, even with large script libraries.
IntelliSense accepts diverse coding styles so that you get full IntelliSense support for almost every library.
IntelliSense displays XML documentation comments as you type.
For more information, see Creating and Using IntelliSense Code Snippets.
Simplified Web Deployment
With Visual Studio 2010, you can package and publish your Web application in one click.
The Web Deployment Tool, also known as MSDeploy, enables you to package your Web application for deployment to an Internet Information Services (IIS) Web server. A Web package is a .zip file or a folder structure that includes everything a Web server needs to host your application. It contains Web content, IIS settings, database scripts, components, registry settings, and certificates. The Web Deployment Tool has been integrated into Visual Studio and enables you to create Web packages with one click.
You can now publish to a server by using the Web Deployment Tool, FTP, folder copying, or FrontPage Server Extensions in one click. Visual Studio stores all the setting information, such as publish method, server information, and user credentials.
Web Configuration Transformations
You can now configure your project to transform the web.config file during deployment. When you deploy the project, the settings in web.config automatically match the settings on your debug, staging, and production servers.
For more information, see ASP.NET Web Application Project Deployment Overview.
Visual Studio 2010 also includes new features for ASP.NET and support for MVC-Based Web applications. For more information, see What's New in ASP.NET 4 and Visual Web Developer.
WPF and Silverlight Designer
In Visual Studio 2010, various designer improvements have been made to help you create Windows Presentation Foundation (WPF) and Silverlight applications.
Improved Support for Silverlight
In Visual Studio 2008, the designer support for Silverlight projects is limited to a read-only Preview window. In Visual Studio 2010, the designer support is the same for Silverlight as it is for WPF projects. For example, in Silverlight projects you can now select and position items with a mouse on the designer surface. For more information, see Windows Presentation Foundation in Visual Studio.
Drag-and-Drop Data Binding for WPF
After you add a data source to your project, you can generate data-bound Windows Presentation Foundation (WPF) controls by dragging items from the Data Sources window to the WPF Designer. For more information, see Binding WPF Controls to Data in Visual Studio.
Visualizing WPF objects
The debugger in Visual Studio 2010 includes the WPF Tree visualizer, which displays WPF objects in a more useful way. When you invoke the visualizer on a WPF object from the Watch window, you see the object displayed as a tree and a list of properties. For more information, see How to: Use the WPF Tree Visualizer.
Visual C++ Development
Following are some of the new Visual C++ features.
Improved User Experience
A number of improvements have been made to make the Visual C++ IDE more responsive, especially when you work with large applications. Many IDE components, such as the IntelliSense engine, now parse and process files in the background. You no longer have to wait for Visual Studio to re-process the whole project every time that you modify a header file, switch between project elements, or reconfigure your project from debug to release.
The new IntelliSense is more accurate because it handles advanced C++ code constructs and conditionally defined macros that the old version could not handle.
Improved IntelliSense Error Reporting
In earlier versions of Visual Studio, it can be unclear why IntelliSense fails for a line of code. In Visual Studio 2010, the IDE detects code that will cause a loss of IntelliSense and underlines that code with a red wavy line. In addition, the IDE reports any IntelliSense errors to the Error List window. You can double-click the error in the Error List window to go to the code that is causing a problem.
#include Automatic Completion
The IDE now supports automatic completion for the #include keyword. When you type #include, the IDE creates a list of valid header files. As you continue typing, the IDE filters the list based on your typing. At any time, you can select the file that you want to include. This enables you to quickly include files without knowing the exact file name.
Targeting of Specific Compilers and Libraries
In Visual Studio 2010, Visual C++ projects can target either the toolset in Visual Studio 2010 or the toolset in Visual Studio 2008. This enables you to take advantage of the IDE enhancements in Visual Studio 2010 while you continue to use an earlier version of the Visual C++ libraries and compiler. To switch between toolsets, you are only required to change one property in your project file. For more information, see General Property Page (Project).
MFC Class Wizard
In Visual Studio 2010, the MFC Class Wizard is reintroduced. This wizard can be started from anywhere in your solution. It enables you to add classes, messages, and variables without having to manually change individual code files.
Visual C++ projects use a new file format (.vcxproj) that replaces the old format (.vcproj). To build projects, you now use MSBuild.exe instead of VCBuild.exe. MSBuild, which is the build platform for Microsoft, provides several benefits, including better diagnostics, extensibility, and integration. For more information, see MSBuild (Visual C++).
Restart Manager Support
Visual Studio now supports the restart manager in Microsoft Foundation Classes (MFC) applications. The restart manager is a Windows feature that protects users against accidental data loss by regularly saving open documents. If your application stops unexpectedly, the restart manager restarts the application and gives the user the option of restoring the automatically saved data. You can add this functionality to an existing application by adding just one line of code and recompiling. By using the restart manager, you can greatly reduce the chances of accidental data loss in your applications. For more information, see How to: Add Restart Manager Support.
New C++0x Language Features
The Visual C++ compiler introduces five new features to support the C++0x standard: lambda expressions, rvalue references, compile-time assertions, expression type discovery, and automatic type deduction. For more information, see What's New in Visual C++ 2010.
You can now write programs that distribute work across multiple processors without having to work directly with threads or the thread pool. Visual Studio 2010 includes parallel computing libraries for both the C runtime library (CRT) and the .NET Framework. You can also debug native and managed applications by using the new multithreading tools in the Visual Studio debugger. For more information, see the Parallel Computing Developer Center Web site.
Parallel Programming in the .NET Framework
.NET Framework 4 includes new libraries that support task and data parallelism, a parallel implementation of LINQ to Objects called Parallel Language Integrated Query (PLINQ), and various new data types for synchronization and concurrency. These libraries rely on a new task scheduler that is integrated with the .NET Framework thread pool. For more information, see Parallel Programming in the .NET Framework.
Parallel Programming in Visual C++
The C runtime library now includes the Concurrency Runtime, which is a concurrent programming infrastructure for C++. For more information, see Concurrency Runtime.
Parallel Programming Tools
The following are some tool enhancements that support parallel programming.
The debugger includes new Parallel Tasks and Parallel Stacks windows that enable you to do the following:
View the state of all Task instances that are running in an application.
View the call stacks for all threads in an application.
Navigate to code from the debugger.
For more information, see Parallel Diagnostic Tools.
In Visual Studio 2010, SharePoint development is significantly improved. You can create, edit, debug, package, and deploy and activate SharePoint projects from within Visual Studio. Site deployment is as easy as pressing F5. You can even browse SharePoint sites by using Server Explorer/Database Explorer. For more information, see SharePoint Development in Visual Studio and What's New in SharePoint Development.
Cloud Computing Tools
In Visual Studio 2010, you can easily install and enable Windows Azure Tools. Windows Azure Tools enable you to build scalable Web applications and services on Windows Azure. To enable Windows Azure Tools, click Cloud Services in the New Project dialog box. For more information, see Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio.