Thursday, 1 March 2012

new tools in Visual Studio 11 Beta


This topic contains links to information about new features and enhancements in Visual Studio 11 Beta. It contains the following sections:
This section contains information about the new tools in Visual Studio 11 Beta that help you design, build, test, and package your Metro style apps for the Windows 8 Consumer Preview operating system. Metro style apps are tailored to your users' needs, to specific devices, to touch interaction and hardware events, and to the new Windows user experience in Windows 8 Consumer Preview. Metro style apps run on wide variety of hardware platforms, including PCs and tablets, and can be tailored to take advantage of the unique characteristics available with various devices. If, for example, an app is running on a tablet device, you can tailor the app to reconfigure the layout of UI elements when the user rotates the tablet from landscape mode to portrait mode. For more information about Metro style apps, see Getting started with Metro style apps.

Metro Style App Project Templates


You can start creating a Metro style app by using one of several default project templates that provide the basis for various kinds of Metro style apps. For more information, see Visual Studio for Metro style app development.
The templates will vary depending on your programming language:
  • Metro style apps written using JavaScript. You can create a complete Metro style app by using JavaScript along with HTML. For more information, see Developing Metro style apps (JavaScript).
  • Metro style apps written using C++, C#, or Visual Basic. You can create a complete Metro style app by using C#, C++, or Visual Basic along with XAML. For more information, see Developing Metro style apps (C#/C++/VB).

Debugging


Visual Studio includes a set of testing and debugging tools that can help you insure that your Metro style app is of the highest quality. For more information, see Debugging and testing Windows Metro style apps.
You can debug a Metro style app locally, which is similar to using the traditional Visual Studio debugging model. You can also debug apps in the Simulator on the local machine, or you can debug remotely on a tethered device:

Visual Studio IDE


  • Store menu. You can use the new Store menu to create a developer account at the Windows Store and reserve a name for an app. For more information see, see Packaging your app using Visual Studio.
  • Package and upload an app. You can create an app manifest and package all the required files together so that you can upload them to the Windows Store. For more information, see Packaging your app using Visual Studio.

Quality Tools

Blend for Microsoft Visual Studio 11 Beta


You can use Blend to visually design your HTML-based Metro style apps. For more information, see the Windows Dev Center.
These changes include new IDE features, improvements for parallel computing, and new and enhanced features for developing web, data, and SharePoint applications.

Languages

Title
Description
What's New for Visual Basic in Visual Studio 11 Beta
Describes new features in the Visual Basic language and Code Editor.
What's New for Visual C# in Visual Studio 11 Beta
Describes new features in the C# language.
What's New for Visual C++ in Visual Studio 11 Beta
Describes new and revised features in Visual C++.
What's New for Visual F# in Visual Studio 11 Beta
Describes enhancements in the Code Editor for the F# language and new features of the F# core library.

Other Technologies

Title
Description
Adopting Visual Studio and Team Foundation Server for Application Lifecycle Management
Outlines the activities of team members as they adopt Visual Studio for application lifecycle management.
What's New for Application Lifecycle Management Development in Visual Studio 11 Beta
Describes the new features for developing products throughout the application lifecycle.
What's New for Application Lifecycle Management Testing in Visual Studio 11 Beta
Describes the new features for testing products throughout the application lifecycle.
What's New in the .NET Framework 4.5 Beta
Contains information about key features and improvements in the .NET Framework 4.5.
What's New in MSBuild 4.5
Describes the new features in MSBuild with the .NET Framework 4.5.
What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta
Describes the changes and enhancements for web development in Visual Studio 11 Beta.
What's New for Data Application Development in Visual Studio 11 Beta
Describes new features, such as SQL Server Object Explorer, the new Table Designer, and the SQL Server Express LocalDB engine.
What’s New for the Debugger in Visual Studio 11 Beta
Discusses enhancements to the debugger, which include the new GPU Threads and Parallel Watch windows.
What's New for LightSwitch in Visual Studio 11 Beta
Describes the new capabilities in the second version of Visual Studio LightSwitch.
What's New for SharePoint Development in Visual Studio 11 Beta
Describes the new and enhanced features for SharePoint development in Visual Studio 11 Beta.
Installing and Managing Visual Studio Tools and Extensions
Provides an overview of Extension Manager, which you can use to install a variety of tools and extensions for Visual Studio.
The following sections describe new and enhanced features in the Visual Studio IDE. For information about IDE features for developers of Metro style apps, see Tour of the IDE for C#/C++/Visual Basic Developers or Tour of the IDE for JavaScript Developers.

Projects and Solutions

  • Project and solution backward compatibility. Use Visual Studio 11 Beta to open and edit projects and solutions that were created in Visual Studio 2010 SP1 without converting the Visual Studio 2010 SP1 project first. For more information, see Visual Studio 11 Compatibility.
  • Browse code in Solution Explorer. Browse the types and members in your projects, search for symbols, view a method’s Call Hierarchy, find symbol references, and perform other tasks without switching between multiple tool windows. For more information, see Viewing the Structure of Code.

Window Management

  • Access frequently used files more easily. Pin files that you use often to the left side of the tab well so that you can access them easily regardless of how many files are open in the IDE.
  • Preview files in the Code Editor. Reduce file clutter in the editor by viewing files without opening them. Preview files in a blue tab on the right side of the document tab well. If you modify the file or choose the Open button, the file opens. For more information, see Code and Text Editor.
  • Enhanced multi-monitor support. Dock multiple floating windows together as a “raft” on other monitors. You can also create multiple instances of Solution Explorer and move them to another monitor. For more information, see How to: Arrange and Dock Windows.

Search

  • Search across the IDE. Locate menu commands quickly, open Options dialog box pages, or search across file names and paths of open documents by using Quick Launch. Choose the Enter key or choose an entry to open the dialog box or window that’s associated with the command. For more information, see Quick Launch.
  • Search in Tool windows. Filter the view by entering a keyword in the search box at the top of certain tool windows, such as the Toolbox, Solution Explorer, Error List, and Team Explorer. For more information, see Finding and Replacing Text.
  • New regular expression syntax. Use regular expression syntax from the .NET Framework in the Find and Replace control and the Find in Files and Replace in Files dialog boxes. For more information, see Using Regular Expressions in Visual Studio.

Code Editor for C++

  • Semantic colorization. More C++ tokens, such as types, enumerations, and macros, now have colorization by default. Parameters appear in italics. You can specify more token colorizations in the Options dialog box under Environment, Fonts and Colors. For more information, see Code and Text Editor.
  • Reference highlighting. You can highlight all instances of a symbol in the current file by pointing to the symbol. You can move among the highlighted references by choosing the Ctrl+Shift+Up Arrow or the Ctrl+Shift+Down Arrow keys. You can turn this feature off in the Options dialog box under Text Editor, C/C++, Advanced.
  • List Members. The List Members list appears automatically as you enter text in the code editor. Results are filtered so that only relevant members appear. You can control filtering logic by opening the Options dialog box and then changing the settings under Text Editor, C/C++, Advanced. For more information, see Using IntelliSense.
  • C++/CLI IntelliSense. C++/CLI now supports all IntelliSense features, such as Quick Info, Parameter Help, List Members, and Auto Completion.
  • C++ code snippets. Skeleton code is available for basic code constructs, such as switch, if-else, and for loop, in the List Members list. Choose a snippet from the list to insert it into your code, and then fill in the required logic. You can also create custom snippets for use in the editor. For more information, see Code Snippets.

Code Editor for JavaScript

  • IntelliSense. IntelliSense performance is improved. To customize the behavior of the JavaScript Code Editor and IntelliSense, on the menu bar, choose Tools, Options, Text Editor. For more information, see JavaScript IntelliSense.
  • Support for ECMAScript 5 and the HTLM5 DOM.
  • Parameter Help. You can provide IntelliSense for fields, function overloads, and variables by using triple-slash (///) code comments.
  • Signatures in statement completion. Function signatures display on the right side of the statement completion list.
  • Immediate feedback. IntelliSense includes statement completion for identifiers in the active document when accurate information about objects isn’t available. For more information, see Statement Completion for Identifiers.
  • Implicit references. You can control which objects are available in the global scope by using reference groups. To configure reference groups, on the menu bar, choose Tools, Options, Text Editor, JavaScript, IntelliSense, References. For information about references, choose the F1 key on specific UI elements.
  • Breakpoints. You can set breakpoints on specific locations in a single line of code. For example, in the code var y = 5; var x = 10;, you can set the breakpoint on only var x = 10;.
  • Script Loader. Delay-loaded scripts are now loaded in the development environment, which allows IntelliSense to provide information about the script objects.
  • Brace matching. Matching braces are highlighted when the cursor is on the left side of an opening brace or on the right side of a closing brace.
  • Outlining. New navigational aids include collapsible functions in the editor.
  • Go To Definition. You can put your cursor in a function and choose the F12 key (or right-click the function and then choose Go To Definition) to open the JavaScript file that contains the definition of the function. The page opens at the location in the file where the function is defined. This feature isn’t supported for generated files.
  • Drag-and-drop references. You can drag .js files from Solution Explorer to the JavaScript Code Editor, where they’re added as references. References that you add in this manner appear at the top of the page in the Code Editor.

Async Feature

Visual Basic and C# introduce the Async feature, which makes asynchronous programming almost as straightforward as synchronous programming. Asynchronous code traditionally has required you to define continuations to capture what happens after a called asynchronous operation finishes. This requirement complicates your code and makes routine tasks such as exception handling more awkward and difficult.
By using the Async feature, you can call asynchronous methods without defining continuations or splitting your code across multiple methods or lambda expressions. For more information, see Asynchronous Programming with Async and Await (C# and Visual Basic).

Caller Information

Visual Basic and C# introduce Caller Info attributes, which you can use to obtain information about the caller to a method. You can obtain the source code file path, source code line number, and member name of the caller. For more information, see Caller Information (C# and Visual Basic).

Visual Basic

  • Iterators. You can use iterators to perform custom iterations over collections. An iterator uses the Yield statement to return each element in the collection one at a time. For more information, see Iterators (C# and Visual Basic).
  • Call Hierarchy. The IDE for Visual Basic now supports the Call Hierarchy feature. You can use this feature to navigate through code by displaying all calls to and from a selected method, property, or constructor. For more information, see Call Hierarchy.
  • Global keyword. By using the Global keyword in a Namespace statement, you can define a namespace out of the root namespace of your project. For more information, see Namespaces in Visual Basic.
The following sections describe new Visual C++ features. For more information, see What's New for Visual C++ in Visual Studio 11 Beta.

Improved Support for C++11 Standards

  • Standard Template Library. Standard Template Library (STL) support is extended to provide additional programming constructs that the C++11 specification requires.
  • Stateless lambdas. Stateless lambdas are defined as code that starts with an empty lambda-introducer [] that captures no local variables. These elements are now implicitly convertible to function pointers, as the C++11 standard requires.
  • SCARY iterators. SCARY iterators are implemented, as permitted but not required by the C++11 Standard.
  • Range-based for loops. Write more robust loops that work with arrays, STL containers, and (when collection.h is included) WinRT collections in the form for ( for-range-declaration : expression ).
  • Scoped enumerations support. The C++ enumclassenum-key is now supported.

Metro Style App Development Support

  • Native XAML-based UI model. For Metro style apps, you can use the new native XAML-based UI model.
  • Visual C++ Component Extensions. These extensions simplify consumption of Windows Runtime objects, which are a necessary part of Metro style apps.
  • DirectX Metro style games. Develop engaging and immersive games by using the new DirectX support for Metro style apps.
  • XAML and DirectX interoperability.Metro style apps that use both XAML and DirectX now interoperate efficiently.
  • Windows Runtime Component DLL development. Component DLL development makes the Windows Runtime environment extensible.

Visual C++ Compiler and Linker

  • Auto-vectorizer. Where possible, the C++ compiler automatically vectorizes loops. Vectorization reorganizes a loop so that the CPU can execute multiple iterations at the same time. Vectorized loops can run up to eight times faster on CPUs that support vectorization.
  • Auto-parallelizer. The new auto-parallelizer improves how your code runs on multi-core and multiprocessor hardware. This feature reorganizes a loop so that it can execute on multiple threads at the same time. You can tell the compiler which loops to parallelize by using the #pragma parallelize directive.

Code Quality Tools

  • Updated unit test framework. Write unit tests in C++ by using the new framework in Visual Studio.
  • Architecture dependency graphs. Understand your code better by generating dependency graphs for binary, class, namespace, and include files in your C++ solution or projects.
  • Layer diagrams. Use layer diagrams to validate architecture design against implementation code that’s written in C++.
  • Architecture Explorer. You can now use the Architecture Explorer to explore the assets in your C++ solution, projects, and files.
  • Code coverage. Code coverage is updated to dynamically instrument binaries at run time. This change reduces configuration overhead and increases performance. You can also collect code coverage data from unit tests for C++ applications.

Related Sections

For information about other new features in Visual C++, see the following sections in this topic:

Information-Rich Programming

Visual F# in Visual Studio 11 Beta extends the succinct and expressive F# language to support information-rich programming. You can use this technology to program directly against rich spaces of data and services that often dominate enterprise and web programming, such as databases, web services, web data feeds, and data brokers. Information-rich programming in F# includes the F# Type Providers mechanism, F# LINQ Queries, and a set of built-in type providers for database, OData, and web service programming. For more information, see What's New for Visual F# in Visual Studio 11 Beta.

Debugger

Remote debugging. The Visual Studio remote debugging process is simplified, and you can more easily discover and connect to computers that are running the remote debugger in the Select Remote Debugger Connection dialog box. For more information, see Remote Debugging Setup.

IntelliTrace

Collecting IntelliTrace data with the stand-alone utilities. You can use the IntelliTrace collection utilities to collect logs of IntelliTrace events and other debugging information about computers that don’t have Visual Studio installed. Because of the low-impact installation of the utilities, you can use IntelliTrace log files to debug issues that appear on production servers and other computers where maintaining the computer configuration is important. Note that you can open IntelliTrace log files on only those computers that are running Visual Studio Ultimate. For more information, see Collecting IntelliTrace Data Everywhere.

Code Analysis

Code Analysis window. Code analysis warnings now appear in the Code Analysis tool window. In this window, you can filter messages by keyword, project, and severity. For certain C++ warnings, the message lists source lines that identify the execution path that led to the warning.
New C++ concurrency warnings. New concurrency warnings help you ensure locking disciplines in multithreaded C/C++ programs. The analyzer detects several concurrency bugs, which include potential race conditions, lock order inversions, caller/callee locking contract violations, and mismatched synchronization operations.
C++ rule sets. By creating or using rule sets, you can specify the analysis rules that you want to apply to code analysis runs.
C++ one-click suppression. In the Code Analysis window, you can suppress a particular warning by inserting a pragma into the source code.
For more information, see Analyzing Application Quality by Using Code Analysis Tools.

SQL Server Object Explorer

The new SQL Server Object Explorer provides a view that's like SQL Server Management Studio. You can open SQL Server Object Explorer from the View menu in Visual Studio. For more information, see Connected Database Development.

New Table Designer

The new Table Designer enables you to define a table graphically and have an at-a-glance understanding of its related objects. As you change the table definition by using a graphical interface, the table’s definition is updated in the Script pane. You can apply the SQL in the Script pane by choosing the new Update button.
The new Table Designer appears for databases that are in the SQL Server 2012 Release Candidate 0 format. For more information, see How to: Create Database Objects Using Table Designer.

SQL Server Express LocalDB Engine

The SQL Server Express LocalDB engine is a new lightweight version of SQL Server that is used to access a SQL Server 2012 Release Candidate 0 database file (.mdf). For more information, see Local Data Overview.
The following sections describe new and enhanced features for ASP.NET and web development. For more information, see What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta.

ASP.NET Core Services

ASP.NET core services include enhancements for request validation and new support for the WebSockets protocol. You can now bundle and minify JavaScript, read and write HTTP requests and responses asynchronously, and use asynchronous HTTP modules and handlers. In addition, encoding APIs for preventing cross-site scripting have been integrated into the core framework of ASP.NET pages.

ASP.NET Web Forms

ASP.NET Web Forms now offer model binders for data access, which resemble those in ASP.NET MVC. By using model binders, you can write code that’s called directly by data-bound controls, which works like action methods in ASP.NET MVC. Additional enhancements to Web Forms applications include strongly typed data controls, support for client-side validation using unobtrusive JavaScript, redirection of references to built-in JavaScript files to the Microsoft CDN, and support for new HTML5 form input types.

Visual Web Developer Enhancements

  • Multi-browser support. Installed browsers appear in a list next to the Start Debugging button in Visual Studio. You can now test the same page, application, or site in a variety of browsers.
  • Page Inspector. Page Inspector renders a webpage (HTML, Web Forms, ASP.NET MVC, or Web Pages) directly within the Visual Studio IDE so that you can examine both the source code and the resulting output. For ASP.NET pages, you can determine which server-side code produced the HTML markup that’s rendered to the browser.
  • HTML editor. The new HTML editor offers support and snippets for HTML5 and improved IntelliSense, which filters on the text that you enter so that only relevant options appear. In addition, you can configure Visual Studio to validate a page against the schema that the page's <!DOCTYPE> declaration specifies, and you can save selected markup to a user control. Other improvements include Smart Tasks in Source view, smart indentation inside tag pairs, and automatic renaming of the corresponding tag when you modify one tag in a pair.
  • CSS editor. The CSS editor now supports CSS3. Other enhancements include sections that you can expand and collapse, hierarchical indentation, the ability to comment and uncomment blocks, improvements in IntelliSense like those in the HTML editor, support for CSS hacks, snippets for vendor-specific extensions to CSS, and a color picker.
  • JavaScript editor. For information about enhancements to the JavaScript editor, see the Code Editor Enhancements for JavaScript section.

Data-Related Enhancements

SQL Server Express LocalDB replaces SQL Server Express as the default database engine for development. This engine is a lightweight version of SQL Server that has all the programmability features of a SQL Server database. You can use SQL Server Object Explorer in Visual Studio to manage database objects in a way similar to SQL Server Management Studio. You can add new DataAnnotation attributes to properties to automate validation for frequently used data types such as e-mail addresses, telephone numbers, and credit-card numbers.

Multi-Version Support

ASP.NET 4.5 updates multi-targeting so that you can work with projects that target earlier versions of the .NET Framework. You can also open and work with Visual Studio 2010 SP1 projects in Visual Studio 11 Beta and Visual Studio 11 Beta projects in Visual Studio 2010 SP1.

IIS Express

In Visual Studio 11 Beta, IIS Express replaces the ASP.NET Development Server as the default server for web development.
  • New designers for lists and content types. When you create a list or content type in Visual Studio, a designer now helps you set up and lay out the contents of that list or content type.
  • Site Column project item template. By using this template, you can create site columns, or "fields," more easily.
  • Silverlight Web Part project template. This template makes hosting a Silverlight application in a web part easier and more convenient. With this template, you can create a Silverlight application or provide your own, and the template also provides a web part project with which to associate the Silverlight application.
  • Remote publishing. You can now publish your SharePoint solutions to remote SharePoint sites as well as local sites.
  • Support for ALM Features. The Visual Studio SharePoint tools now fully support the following ALM features:
    • Performance profiling: Tests your application's performance and identifies and locates bottlenecks.
    • Unit testing: Creates small, procedure-level tests to debug your source code.
    • IntelliTrace debugging: Debugs your SharePoint applications across the boundaries of Visual Studio, including the web.
  • Sandboxed visual web parts. Visual web parts now support sandboxed projects, not just farm projects.
  • Improved support for sandboxed solutions. When you work on sandboxed solutions, Visual Studio displays a compiler error if you try to use farm-only API calls. Also, IntelliSense displays only those APIs that are compatible with sandboxed solutions when you work on a sandboxed solution.
  • Support for JavaScript debugging and IntelliSense for JavaScript. You can now debug JavaScript in SharePoint projects, and IntelliSense is enabled for JavaScript. URL resolution for JavaScript works for visual web parts in sandboxed solutions.
The following section describes new and enhanced tools for working with 2D and 3D graphics and game development in Visual Studio 11 Beta.

Asset Viewers and Editors

  • Image and texture editing. Create, inspect, and edit bitmap and compressed image formats (DDS, TGA, TIFF, PNG, JPG, GIF) with a new image editor that supports transparency and mipmaps. For more information, see Working with Images and Textures.
  • 3D models. Inspect standard 3D model formats (OBJ, COLLADA, and Autodesk’s FBX) directly in Visual Studio to improve artist-developer workflow. Create placeholder art for 3D games and applications by using built-in 3D primitive generation and materials. For more information, see Working with 3-D Models.

DirectX Programmable Shaders (HLSL)

  • Edit and build support for HLSL. Add, edit, and compile HLSL shaders in Visual Studio projects more easily with syntax coloring, indenting and outlining of HLSL source code, and automatic MSBuild support for the Microsoft HLSL Compiler (fxc.exe).
  • Visual Shader designer. Create advanced pixel shaders by using a new, node-based shader designer that provides a 3D preview of the effect at every stage. Export the shader as HLSL to use in your application. For more information, see Working with Shaders.

DirectX Graphics Debugger

Debug Direct3D applications directly in Visual Studio by taking whole-frame snapshots of a running application and then re-creating the frames step-by-step while inspecting Direct3D events, device state, buffer contents, and even individual vertices and pixels. Determine which Direct3D API calls take the most processing time. For more information, see Debugging DirectX Graphics.

C++ Accelerated Massive Parallelism

C++ Accelerated Massive Parallelism (C++ AMP) accelerates the execution of your C++ code by taking advantage of the data parallel hardware that’s often present as a GPU on a discrete graphics card. This programming model includes multidimensional arrays, indexing, memory transfer, tiling, and a mathematical function library. By using C++ AMP language extensions and compiler restrictions, you can control how data moves from the CPU to the GPU and back. For more information, see C++ Accelerated Massive Parallelism (C++ AMP).

Parallel Debugging

You can use the GPU Threads and Parallel Watch windows to debug parallel applications. For more information, see What’s New for the Debugger in Visual Studio 11 Beta.

Concurrency Visualizer

The Concurrency Visualizer has several new features to enable quicker access and increase configuration control. This tool also includes a new SDK that you can use to define custom performance data that appears in the visualizer. You can use the following new features to examine performance, especially of code that uses parallel processing:
  • The chart zoom control provides a graphical display of the entire application execution. By using this control together with the zoom control, you can more easily focus on a portion of code.
  • The GPU Activity graph on the Utilization tab shows the total number of engines that are running.
  • The timeline on the Threads tab displays information for any data that you’ve defined by using the Concurrency Visualizer SDK.
You can perform the following tasks from the new Concurrency Visualizer submenu, which is on the Analysis menu in Visual Studio:
  • Start the current project, and display trace information in the visualizer.
  • Start any application on your computer, and display trace information in the visualizer.
  • Attach to a running process.
  • Open an existing trace file, and view it in the visualizer.
  • Add support for the Concurrency Visualizer SDK to your project.
  • Configure display options for the Concurrency Visualizer.
By choosing Advanced Settings on the Concurrency Visualizer submenu, you can configure the following settings more easily than you could in earlier versions:
  • Symbols: The Symbols tab includes a quick link to the debugging symbols setting.
  • Just My Code: You can use Just My Code to specify the executable files that you want the visualizer to show.
  • Buffering:  You can set several buffering parameters for the Event Tracing for Windows collection.
  • Filter: You can specify which events, among CLR, sample, GPU, and file I/O, to display in the visualizer.
  • Markers: You can configure how the marker data that you create by using the Concurrency Visualizer SDK appears in the visualizer.
  • File: You can specify the folder location of the trace files. Visual Studio 11 Beta introduces the *.cvtrace file.
By using the Concurrency Visualizer SDK, you can instrument your code to visualize additional markers, flags, and messages in the Concurrency Visualizer. The SDK is available for both managed and native code. Visual Studio 11 Beta includes several samples to help you start to use this feature.

TPL Dataflow

Task Parallel Library (TPL) Dataflow supports parallel dataflow-based programming by building on features that were introduced in the .NET Framework 4. For more information, see Dataflow (Task Parallel Library).
This section lists key improvements in the .NET Framework 4.5 Beta. For more information, see What's New in the .NET Framework 4.5 Beta.

Core Improvements

  • System restarts are reduced during installation of the NET Framework.
  • Asynchronous file operations are provided that use the new Async feature in C# and Visual Basic.
  • Background just-in-time (JIT) compilation on multi-core processors improves application performance.

Networking

  • A new programming interface is provided for HTTP applications.

Windows Communication Foundation (WCF)

  • New features make it simpler to develop and maintain WCF applications.
  • New asynchronous streaming support is provided.

Windows Workflow Foundation

  • The Workflow Designer has several enhancements.
  • You can create state machine workflows.

Windows Presentation Foundation (WPF)

  • You can implement a ribbon user interface by using the new Ribbon control.
  • You can display large sets of grouped data faster.

new features .NET Framework 4.5

This topic contains a summary of key new features and improvements in the following areas of the .NET Framework 4.5 Beta. This topic does not provide comprehensive information and is subject to change.
Windows Metro style apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 Beta is available for building Metro style apps for Windows by using C# or Visual Basic. This subset is called .NET APIs for Metro style apps and is discussed in an overview in the Windows Dev Center.
The following features and improvements were added to the common language runtime and to .NET Framework classes:
  • Ability to reduce system restarts by detecting and closing .NET Framework 4 applications during deployment. See Reducing System Restarts During .NET Framework 4.5 Beta Installations.
  • Background just-in-time (JIT) compilation, which is optionally available on multi-core processors to improve application performance. See ProfileOptimization.
  • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out. See the Regex.MatchTimeout property.
  • Ability to define the default culture for an application domain. See the CultureInfo class.
  • Console support for Unicode (UTF-16) encoding. See the Console class.
  • Support for versioning of cultural string ordering and comparison data. See the SortVersion class.
  • Better performance when retrieving resources. See Packaging and Deploying Resources.
  • Zip compression improvements to reduce the size of a compressed file. See the System.IO.Compression namespace.
  • Ability to customize a reflection context to override default reflection behavior through the CustomReflectionContext class.
  • Support for the 2008 version of the Internationalized Domain Names in Applications (IDNA) standard when the System.Globalization.IdnMapping class is used on Windows 8 Consumer Preview.
  • Delegation of string comparison to the operating system, which implements Unicode 6.0, when the .NET Framework is used on Windows 8 Consumer Preview. When running on other platforms, the .NET Framework includes its own string comparison data, which implements Unicode 5.x. See the String class.

Managed Extensibility Framework (MEF)

The Managed Extensibility Framework (MEF) provides the following new features:
  • Support for generic types.
  • Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
  • Multiple scopes.
For more information, see Managed Extensibility Framework Overview and the entry What’s new in MEF 2 Preview 4 in the BCL team blog.

Asynchronous File Operations

In the .NET Framework 4.5 Beta, new asynchronous features were added to the C# and Visual Basic languages. These features add a task-based model for performing asynchronous operations. To use this new model, use the asynchronous methods in the I/O classes. See Asynchronous File I/O.
Back to top
The .NET Framework 4.5 Beta provides several new features and improvements for parallel computing. These include improved performance, increased control, improved support for asynchronous programming, a new dataflow library, and improved support for parallel debugging and performance analysis. See the entry What’s New for Parallelism in .NET 4.5 in the Parallel Programming with .NET blog.
Back to top
Web

ASP.NET 4.5 Beta includes the following new features:
  • Support for new HTML5 form types.
  • Support for model binders in Web Forms. These let you bind data controls directly to data-access methods, and automatically convert user input to and from .NET Framework data types.
  • Support for unobtrusive JavaScript in client-side validation scripts.
  • Improved handling of client script through bundling and minification for improved page performance.
  • Integrated encoding routines from the AntiXSS library (previously an external library) to protect from cross-site scripting attacks.
  • Support for WebSockets protocol.
  • Support for reading and writing HTTP requests and responses asynchronously.
  • Support for asynchronous modules and handlers.
  • Support for content distribution network (CDN) fallback in the ScriptManager control.
For more information about these features, see What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta.
Back to top
The .NET Framework 4.5 Beta provides a new programming interface for HTTP applications. For more information, see the new System.Net.Http and System.Net.Http.Headers namespaces.
Support is also included for a new programming interface for accepting and interacting with a WebSocket connection by using the existing HttpListener and related classes. For more information, see the new System.Net.WebSockets namespace and the HttpListener class.
In addition, the .NET Framework 4.5 Beta includes the following networking improvements:
  • RFC-compliant URI support. For more information, see Uri and related classes.
  • Support for Internationalized Domain Name (IDN) parsing. For more information, see Uri and related classes.
  • Support for Email Address Internationalization (EAI). For more information, see the System.Net.Mail namespace.
  • Improved IPv6 support. For more information, see the System.Net.NetworkInformation namespace.
  • Dual-mode socket support. For more information, see the Socket and TcpListener classes.
Back to top
In the .NET Framework 4.5 Beta, Windows Presentation Foundation (WPF) contains changes and improvements in the following areas:
  • The new Ribbon control, which enables you to implement a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs.
  • The new INotifyDataErrorInfo interface, which supports synchronous and asynchronous data validation.
  • New features for the VirtualizingPanel and Dispatcher classes.
  • Improved performance when displaying large sets of grouped data, and by accessing collections on non-UI threads.
  • Data binding to static properties, data binding to custom types that implement the ICustomTypeProvider interface, and retrieval of data binding information from a binding expression.
  • Repositioning of data as the values change (live shaping).
  • Better integration between WPF and Win32 user interface components.
  • Ability to check whether the data context for an item container is disconnected.
  • Ability to set the amount of time that should elapse between property changes and data source updates.
  • Improved support for implementing weak event patterns. Also, events can now accept markup extensions.
For more information, see What's New in WPF Version 4.5 Beta.
Back to top
In the .NET Framework 4.5 Beta, the following features have been added to make it simpler to write and maintain Windows Communication Foundation (WCF) applications:
  • Simplification of generated configuration files.
  • Support for contract-first development.
  • Ability to configure ASP.NET compatibility mode more easily.
  • Changes in default transport property values to reduce the likelihood that you will have to set them.
  • Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
  • Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
  • New asynchronous streaming support.
  • New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
  • Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
  • Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
  • Support for configuring services in code.
  • XML Editor tooltips.
  • ChannelFactory caching support.
  • Binary encoder compression support.
  • Support for a UDP transport that enables developers to write services that use "fire and forget" messaging. A client sends a message to a service and expects no response from the service.
  • Ability to support multiple authentication modes on a single WCF endpoint when using the HTTP transport and transport security.
  • Support for WCF services that use internationalized domain names (IDNs).
For more information, see What's New in Windows Communication Foundation.
Back to top
Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5 Beta. These new features include:
  • Ability to create state machine workflows.
  • Enhanced Workflow Designer features such as the following:
    • Enhanced workflow search capabilities in Visual Studio, including Quick Find and Find in Files.
    • Ability to automatically create a Sequence activity when a second child activity is added to a container activity, and to include both activities in the Sequence activity.
    • Panning support, which enables the visible portion of a workflow to be changed without using the scroll bars.
    • A new Document Outline view that shows the components of a workflow in a tree-style outline view and lets you select a component in the Document Outline view.
    • Ability to add annotations to activities.
    • Ability to define and consume activity delegates by using the workflow designer.
    • Auto-connect and auto-insert for activities and transitions in state machine and flowchart workflows.
  • Storage of the view state information for a workflow in a single element in the XAML file, so you can easily locate and edit the view state information.
  • A NoPersistScope container activity to prevent child activities from persisting.
  • Support for C# expressions:
    • Workflow projects that use Visual Basic will use Visual Basic expressions, and C# workflow projects will use C# expressions.
    • C# workflow projects that were created in Visual Studio 2010 and that have Visual Basic expressions are compatible with C# workflow projects that use C# expressions.
  • Versioning enhancements:
    • The new WorkflowIdentity class, which provides a mapping between a persisted workflow instance and its workflow definition.
    • Side-by-side execution of multiple workflow versions in the same host, including WorkflowServiceHost.
    • In Dynamic Update, the ability to modify the definition of a persisted workflow instance.
  • Contract-first workflow service development, which provides support for automatically generating activities to match an existing service contract.

Application Platform Overview for Windows Phone

The Windows Phone Application Platform enables developers to create engaging consumer experiences running on a Windows® Phone. It is built upon existing Microsoft® tools and technologies such as Visual Studio, Expression Blend®, Silverlight®, and the XNA Framework. Developers already familiar with those technologies and their related tools will be able to create new applications for Windows Phone without a steep learning curve. This topic includes the following sections:
The Windows Phone Application Platform provides two frameworks for developing applications:
  1. The Silverlight framework for event-driven, XAML-based application development that allows developers to develop creative markup-based user experiences and rich media applications.
  2. The XNA Framework for loop-based games that enables immersive and fun gaming and entertainment experiences.
With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single application.
The Windows Phone Application Platform helps developers to create applications by providing:
  • A familiar and inexpensive toolset.
  • A cohesive and well-designed managed API set.
  • An isolated sandbox for each application.
  • Runtime services on devices that can be used to access web services in the cloud, such as Xbox LIVE®, Windows Azure, location, and notification services. Access to third-party Windows Communication Foundation (WCF) and Representational State Transfer (REST) services across the web is also supported.
  • The Windows Phone Marketplace to distribute their application.
The Windows Phone Application Platform, like most platforms, will continue to evolve over time, but its goal will always be to deliver:
  • Richer applications, developed for a highly standardized platform.
  • Support for personal and connected consumer data across multiple devices.
  • A robust developer portal and application marketplace for complete end-to-end lifecycle management.
  • Powerful and productive development tools.
The Windows Phone Application Platform is designed to support the multi-screen world that consumers live in.
3screens Consumers today use a variety of screens and devices, all equally important and all tied together by the cloud, which connects the relevant information together, providing users with the information they need as they move from device to device. Common user experiences make it easy to move between devices, and a common development platform makes it easy to develop applications for all the device types.
Back to Top
The Windows Phone Application Platform architecture is made up of four main components.
YamaGuide_Yama Arch
  1. Runtimes – Silverlight and the XNA Framework, along with Windows Phone–specific features, combine to provide a mature environment on which to build secure, graphically rich applications.
  2. Tools – Visual Studio and Expression Blend, and their related tools and documentation, create a complete developer experience for quickly creating, debugging, deploying, and updating applications.
  3. Cloud Services – Windows Azure, Xbox LIVE Services, Notifications services, and Location services, along with a variety of other web services, allow developers to share data across the cloud and benefits consumers by providing a seamless experience across whatever device they are using. Connections to third-party web services are also fully supported.
  4. Portal Services – The Windows Phone Marketplace provide robust services that allow developers to register, certify, and market their applications.
Back to Top

Runtimes

With Silverlight and the XNA Framework, all development is done in managed code, in a protected sandbox allowing for the rapid development of safe and secure applications. Applications written for Silverlight or the XNA Framework today will run on Windows Phone with only a minor number of adjustments, such as for screen size or for device-specific features.
The two frameworks, along with Windows Phone–specific components and the Common Base Class Library provide a substantial number of components for developers to construct applications on.
YamaGuide_Frameworks
  • Silverlight - Silverlight is the ideal framework for creating Rich Internet Application-style user interfaces. A Windows Phone Silverlight application exposes its UI through a set of pages. Windows Phone controls that match the Windows Phone visual style can be used to enhance the look and feel of the UI.
    Visual Studio or Expression Blend can be used for designing the XAML-based interfaces. Visual Studio can be used to implement the application logic by utilizing the media rich Silverlight libraries or the base functionality provided by the Common Base Library. For more information, see The Silverlight and XNA Frameworks for Windows Phone.
  • XNA Framework - The XNA Framework is composed of software, services, and resources focused on enabling game developers to be successful developing on Microsoft gaming platforms. Microsoft provides technology that allows professional developers to quickly enable games on platforms like Windows Phone, Xbox 360, Zune HD, and Windows 7. The XNA Framework provides a complete set of managed APIs for game development. This includes 2D sprite-based APIs that support rotation, scaling, stretching, and filtering as well as 3D graphics APIs for 3D geometry, textures, and standard lighting and shading.
    With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single application. For more information, see The Silverlight and XNA Frameworks for Windows Phone.
  • Sensors - A variety of sensors will return data that can be consumed by developers. For example, multi-touch input, accelerometer, compass, gyroscope, and microphone sensors will all be accessible by APIs. For more information, see Touch Input for Silverlight, Touch Input for XNA Framework, or Sensors Overview for Windows Phone.
  • Media – Both Silverlight and the XNA Framework provide developers with a programming model for building rich user experiences that incorporate graphics, animation, and media. The managed APIs support a variety of media formats and allow for discovery and enumeration of media on the device and for playback of that media. For more information, see Media for Windows Phone.
  • Data - Isolated storage allows an application to create and maintain data in a sandboxed isolated virtual folder. All I/O operations are restricted to isolated storage and do not have direct access to the underlying operating system file system. This prevents unauthorized access and data corruption by other applications.
    Structured data can be stored in a relational database and can be accessed by using LINQ to SQL.
    For more information, see Isolated Storage Overview for Windows Phone or Local Database Overview for Windows Phone.
  • Location - The Microsoft Location Service for Windows Phone allows application developers to access the user’s physical location information from a single API. Developers can query for the current location, subscribe to Location Changed events, set the desired accuracy of the data, get access to the device heading and speed, and calculate the distance between points. The Location APIs on the phone will work in conjunction with the Location Cloud Services. For more information, see Location for Windows Phone.
Back to Top

Tools

Developers can download and install a package that includes all the tools that they need to start developing applications for Windows Phone.
If Visual Studio is not already installed, Visual Studio 2010 Express for Windows Phone will be installed.
If Visual Studio is installed, an add-in to Visual Studio will be installed.
For more information about downloading and installing the Windows Phone SDK, see Installing the Windows Phone SDK
  • Visual Studio 2010 - Visual Studio is the IDE for building Windows Phone applications. Within the Visual Studio IDE, developers can create Silverlight or XNA Framework programs that run on Windows Phone. Visual Studio includes a designer, debugger, project system, packager, and manifest generation. For more information, see Visual Studio 2010 Express for Windows Phone.
  • Expression Blend - In the same way that designers use Expression Blend to design Rich Internet Applications for the desktop browser, they can also design creative and unique Silverlight-based applications on a Windows Phone. Expression Blend for Windows Phone allows designers to create XAML-based interfaces for Windows Phone applications, whose behaviors can then be implemented by developers in Visual Studio. For more information, see Expression Blend.
  • Windows Phone Emulator - Windows Phone Emulator is integrated into Visual Studio and Expression Blend to make the testing and debugging of applications easier and more efficient. The emulator fully supports application deployment, debugging, and application execution. It includes support for GPU emulation and orientation change. For more information, see Windows Phone Emulator.
  • XNA Game Studio - The XNA Game Studio is an integrated design environment that developers can use to build fun and exciting games for Microsoft Windows®, the Microsoft Xbox 360® video game and entertainment system, Microsoft Zune®, and Windows Phone. XNA Game Studio extends the Visual Studio tools to support the XNA Framework. The XNA Framework is a managed-code class library that contains functionality targeted specifically at game development tasks. In addition, XNA Game Studio includes tools for incorporating graphical and audio content into your game. For more information, see XNA Game Studio.
  • Samples, Documentation, Guides and Community - Documentation, How-to Guides, sample code, and sample applications are provided to aid developers ramping up on Windows Phone development. Forums, blogs, and websites are available for developers to ask questions and share information with the greater Windows Phone community. The new Visual Studio Help system will allow developers to continuously update their documentation sets. For more information, see App Hub, Windows Phone Blogs, or Windows Phone 7 Forums.
Back to Top

Cloud Services

The Windows Phone Application Platform provides many features for building compelling web-integrated applications. While a Windows Phone is powerful and rich, the cloud makes it even more powerful. The Cloud Services are always on, are more scalable, can contain more functionality, and are not dependent on battery life. Services built on Azure or third-party web services can be accessed to bring data to the phone. The Windows Phone Marketplace provides a means for developers to certify and distribute their applications to consumers.
  • Notifications - To enable efficient, dynamic, and up-to-date information and communication channels, Windows Phone Application Platform provides an API to enable services to notify the user when relevant events have occurred. This eliminates the need for polling and reduces battery consumption. For more information, see Push Notifications for Windows Phone.
  • Location Cloud Services - The Location Cloud Services will work together with the Location APIs on the phone, making its presence transparent to the developer. The service will use Wi-Fi, cellular, and GPS data to provide a single source for providing position lookup. Assisted GPS (AGPS) is available to improve the fix for GPS. For more information, see Location for Windows Phone.
  • Identity, Feeds, Social, and Maps Services - The extensive variety of web services in the cloud allow consumers to identify themselves, interact with social communities, receive data feeds, and use maps for navigation. Developers can enrich this experience by providing new applications that use these services. For more information, see Networking and Web Services Overview for Windows Phone.
  • Windows Azure - Visual Studio 2010 provides the development environment for creating applications using the Windows Azure™ Platform, an Internet-scale cloud computing and services platform hosted in Microsoft data centers. The Windows Azure Platform provides a range of functionality to build applications that span from consumer web to enterprise scenarios and includes a cloud operating system and a set of developer services. Fully interoperable through the support of industry standards and web protocols such as Representational State Transfer (REST) and Simple Object Access Protocol (SOAP), you can use the Azure services individually or together, either to build new applications or to extend existing ones. For more information, see Windows Azure.
  • Microsoft Advertising SDK for Windows Phone - Monetize your Windows Phone applications and games by including ads from Microsoft Advertising. The Microsoft Advertising SDK for Windows Phone enables you to create applications that can do the following:
    • Easily integrate text and banner ads into your applications and games.
    • Provide a monetization solution that maximizes in-app advertising revenues by unlocking the power of multiple sales channels competing in real time to purchase your ad inventory.
    • Provide various ad targeting capabilities to deliver the most relevant ads to your users.
    • Seamlessly handle impression reporting.
Back to Top

Portal Services

The Windows Phone Marketplace provides a centralized location for developers to submit and certify their applications. Consumers have a centralized location from which to buy or update their applications.
  • Registration and Validation - Developers can get started on App Hub by signing up with their Live ID. After registration is complete, developers can get all the needed tools in a single download.
  • Certification, Publishing, and Update Management - A set of tools will help the developer to submit and certify their applications for the Windows Phone Marketplace. Applications are submitted in an .xap file format, which is essentially one compressed file that contains all the files that are needed by the application. Developers can track their submission status and then receive a notification once the certification is complete. After an application is certified, it can then be submitted for publishing on the Windows Phone Marketplace. Developers can set pricing and select the markets in which they want to publish the application.
    If developers fix bugs, add new functionality, or provide a whole new version of the application, they must go through the certification and publishing process again.
  • Windows Phone Marketplace and Billing - The Windows Phone Marketplace provides the one place where developers can make their applications available for purchase by consumers. Both Mobile Operator and credit card billing are supported, making it as easy as possible for consumers to pay for the application.
  • Business Intelligence - Business intelligence tools will provide developers with information reporting about their application.
Back to Top
This section describes how developers can use the Windows Phone Application Platform from the beginning to the end of the development cycle.
YamaGuide_E2E Arch Getting Started With App Hub
App Hub will be the starting point for developers. Developers can begin by signing up for a Windows Live ID. Next, they can sign up to obtain the Windows Phone SDK and associated licensing materials for developing applications using Visual Studio and Expression Blend. This will be a single download that contains everything the developer requires for building an application for Windows Phone. Developers can also register one or more phones for use as test hardware in validating the applications that they are building. Any retail Windows Phone can be registered as a test device.
App Hub contains samples, documentation, and active developer communities that help make Windows Phone developers successful.
Designing an Application and Producing an Application Package
Once developers have signed up to be a Windows Phone developer and have installed the developer tools, they can begin developing their applications.
Games and graphics-intensive applications are created in Visual Studio using the 2D and 3D libraries of the XNA Framework.
The visual design for XAML-based applications for Silverlight is created in Visual Studio and/or Expression Blend. The resulting XAML document containing markup is then interpreted by the Silverlight presentation engine and other components of the Windows Phone Application Platform.
With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single application. For more information, see The Silverlight and XNA Frameworks for Windows Phone.
The Visual Studio IDE is used to write managed code defining the visual behavior of all Windows Phone applications. When the application is completed, a package is created that includes everything the application needs.
Debugging an Application
While creating a Windows Phone application, a developer can debug the program on a phone or in Windows Phone emulator. Debugging the application involves creating a package targeted to the debugging platform and then using Visual Studio to deploy the package. Call stack walking, expression evaluation, source code stepping, and variable watch windows are all supported.
Publishing an Application
After an application has been completed, a developer can make the program available to other users on the Windows Phone Marketplace. To publish to the Windows Phone Marketplace, developers submit a .xap file. The .xap file is a compressed file containing all the information needed by the application. This includes an application icon, a start tile, metadata, and licensing terms that determine how their program can be used.
Next, the developer signs into App Hub and submits the application package for certification. This is the only way to make an application available to consumers. The certification process will verify that the application is well-behaved, works for the languages and markets indicated, and does not adversely affect the overall health of the phone.
Once the package has satisfied the Windows Phone Marketplace certification requirements, the developer is notified and can publish the application to the Windows Phone Marketplace through App Hub. Applications are then made available for consumers to download in the Windows Phone Marketplace. Credit card and mobile-operator billing operations are supported.
Managing Published Applications
After a Windows Phone application is published to the Windows Phone Marketplace, the developer uses App Hub to manage the versions of the application that are available for purchase.