New features in .NET 4.5
Windows Store apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 is available for building Windows Store apps for Windows by using C# or Visual Basic.
The Portable Class Library project in Visual Studio 2012 enables you to write and build managed assemblies that work on multiple .NET Framework platforms. Using a Portable Class Library project, you choose the platforms (such as Windows Phone and .NET for Windows Store apps) to target.
The following features and improvements were added to the common language runtime and to .NET Framework classes:
- Better performance through background garbage collection for servers. When you use server garbage collection in the .NET Framework 4.5, background garbage collection is automatically enabled.
- Background just-in-time (JIT) compilation, which is optionally available on multi-core processors to improve application performance.
- Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out.
- Ability to define the default culture for an application domain.
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.
In the .NET Framework 4.5, new asynchronous features were added to the C# and Visual Basic languages. These features add a task-based model for performing asynchronous operations.
Resource File Generator (Resgen.exe) enables you to create a .resw file for use in Windows Store apps from a .resources file embedded in a .NET Framework assembly.
Managed Profile Guided Optimization (Mpgo.exe) enables you to improve application startup time, memory utilization (working set size), and throughput by optimizing native image assemblies. The command-line tool generates profile data for native image application assemblies.
The .NET Framework 4.5 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.
ASP.NET 4.5 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.
The .NET Framework 4.5 provides a new programming interface for HTTP applications.
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.
In addition, the .NET Framework 4.5 includes the following networking improvements:
· RFC-compliant URI support.
· Support for Internationalized Domain Name (IDN) parsing.
· Support for Email Address Internationalization (EAI).
· Improved IPv6 support.
· Dual-mode socket support.
In the .NET Framework 4.5, 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.
· Repositioning of data as the values change (live shaping).
· 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.
In the .NET Framework 4.5, 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.
· XML Editor Tooltips.
· Binary encoder compression support.
Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5. These new features include:
- State machine workflows
- The ability to set breakpoints on states.
- The ability to copy and paste transitions in the workflow designer.
- Designer support for shared trigger transition creation.
- 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.