The .NET Framework 4.6 introduces the .NET Framework 4.6 Preview and .NET Core. Some new features apply to both, and other features are specific to .NET Framework 4.6 Preview or .NET Core.

ASP.NET 5

.NET Framework 4.6 includes, ASP.NET 5, which is a lean .NET platform for building modern cloud-based apps. The platform is modular so you can include only those features that are needed in your application. It can be hosted on IIS or self-hosted in a custom process, and you can run apps with different versions of the framework on the same server. It includes a new environment configuration system that is designed for cloud deployment.

MVC, Web API, and Web Pages are unified into a single framework called MVC 6. You build ASP.NET 5 apps through the new tools in Visual Studio 14. Your existing applications will work on the new .NET framework; however to build an app that uses MVC 6 or SignalR 3, you must use the project system in Visual Studio 14.

The CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture properties are now read-write rather than read-only. If you assign a new CultureInfo object to these properties, the current thread culture defined by the Thread.CurrentThread.CurrentCulture property and the current UI thread culture defined by the Thread.CurrentThread,CurrentUICulture properties also change.

For apps the target the .NET Framework 4.6 Preview, Task and Task<TResult> objects inherit the culture and UI culture of the calling thread. The behavior of apps that target previous versions of the .NET Framework, or that do not target a specific version of the .NET Framework, is unaffected. For more information, see the "Culture and task-based asynchronous operations” section of the CultureInfo class topic.

.NET Core primarily supports the Unicode encodings and by default provides limited support for code page encodings. You can add support for code page encodings available in the .NET Framework but unsupported in .NET Core by registering code page encodings with the Encoding.RegisterProvider method. For more information, see CodePagesEncodingProvider.

.NET Native

Windows Store apps that target .NET Core and are written in C# can now take advantage of a new technology that compiles apps to native code rather than IL. They produce apps characterized by faster startup and execution times. For more information, see Compiling Apps with .NET Native. For an overview of .NET Native that examines how it differs from both JIT compilation and NGEN and what that means for your code, see .NET Native and Compilation.

To support debugging .NET Native apps, a number of new interfaces and enumerations have been added to the unmanaged debugging API. For more information, see the Debugging (Unmanaged API Reference) topic.

The HostingEnvironment.QueueBackgroundWorkItem method lets you schedule small background work items. ASP.NET tracks these items and prevents IIS from abruptly terminating the worker process until all background work items have completed. This method can't be called outside an ASP.NET managed app domain.

Resizing in Windows Forms controls. This feature has been expanded. You can now use the system DPI setting to resize components of the following additional controls (for example, the drop-down arrow in combo boxes):

This can be done within the same app domain, and doesn't require any extra unmanaged code to interact with MSDTC to perform the promotion. The new method can be called only when there's an outstanding call from System.Transactions to the IPromotableSinglePhaseNotificationPromote method that's implemented by the promotable enlistment.

Profiling improvements. The following new unmanaged profiling APIs provide more robust profiling:

Previous ICorProfiler implementations supported lazy loading of dependent assemblies. The new profiling APIs require dependent assemblies that are injected by the profiler to be loadable immediately, instead of being loaded after the app is fully initialized. This change doesn't affect users of the existing ICorProfiler APIs.

Debugging improvements. The following new unmanaged debugging APIs provide better integration with a profiler. You can now access metadata inserted by the profiler as well as local variables and code produced by compiler ReJIT requests when dump debugging.

You can include XAML (Windows.UI.XAML types) in portable libraries when you target Windows 8.1 or Windows Phone 8.1. The following XAML templates are supported: Blank Page, Resource Dictionary, Templated Control, and User Control.

You can create a portable Windows Runtime component (.winmd file) for use in Store apps that target Windows 8.1 and Windows Phone 8.1.

You can retarget a Windows Store or Windows Phone Store class library like a Portable Class Library.

The .NET Framework content set now includes documentation for .NET Native, which is a precompilation technology for building and deploying Windows Store apps. .NET Native compiles your apps directly to native code, rather than to intermediate language (IL), for better performance. For details, see Compiling Apps with .NET Native. The .NET Native Developer Preview is available for download on the Microsoft Connect website (requires registration).

Core new features and enhancements in the .NET Framework 4.5.1 include:

Automatic binding redirection for assemblies. Starting with Visual Studio 2013, when you compile an app that targets the .NET Framework 4.5.1, binding redirects may be added to the app configuration file if your app or its components reference multiple versions of the same assembly. You can also enable this feature for projects that target older versions of the .NET Framework. For more information, see How to: Enable and Disable Automatic Binding Redirection.

Resizing in Windows Forms controls. You can use the system DPI setting to resize components of controls (for example, the icons that appear in a property grid) by opting in with an entry in the application configuration file (app.config) for your app. This feature is currently supported in the following Windows Forms controls:

Return values in the Visual Studio debugger. When you debug a managed app in Visual Studio 2013, the Autos window displays return types and values for methods. This information is available for desktop, Windows Store, and Windows Phone apps. For more information, see Examine return values of method calls in the MSDN Library.

Edit and Continue for 64-bit apps. Visual Studio 2013 supports the Edit and Continue feature for 64-bit managed apps for desktop, Windows Store, and Windows Phone. The existing limitations remain in effect for both 32-bit and 64-bit apps (see the last section of the Supported Code Changes (C#) article).

Async-aware debugging. To make it easier to debug asynchronous apps in Visual Studio 2013, the call stack hides the infrastructure code provided by compilers to support asynchronous programming, and also chains in logical parent frames so you can follow logical program execution more clearly. A Tasks window replaces the Parallel Tasks window and displays tasks that relate to a particular breakpoint, and also displays any other tasks that are currently active or scheduled in the app. You can read about this feature in the "Async-aware debugging" section of the .NET Framework 4.5.1 announcement.

Better exception support for Windows Runtime components. In Windows 8.1, exceptions that arise from Windows Store apps preserve information about the error that caused the exception, even across language boundaries. You can read about this feature in the "Windows Store app development" section of the .NET Framework 4.5.1 announcement.

Support for arrays that are larger than 2 gigabytes (GB) on 64-bit platforms. This feature can be enabled in the application configuration file. See the <gcAllowVeryLargeObjects> element, which also lists other restrictions on object size and array size.

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. See the Background Server Garbage Collection section of the Fundamentals of Garbage Collection topic.

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.

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.

Delegation of string comparison to the operating system, which implements Unicode 6.0, when the .NET Framework is used on Windows 8. When running on other platforms, the .NET Framework includes its own string comparison data, which implements Unicode 5.x. See the String class and the Remarks section of the SortVersion class.

In the .NET Framework 4.5, 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.

A subset of MEF that you can use when you create Windows Store apps. This subset is available as a downloadable package from the NuGet Gallery. To install the package, open your project in Visual Studio, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.

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. To use this new model, use the asynchronous methods in the I/O classes. See Asynchronous File I/O.

In the .NET Framework 4.5, 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. For more information, see Resgen.exe (Resource File Generator).

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. See the entry What’s New for Parallelism in .NET 4.5 in the Parallel Programming with .NET blog.

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 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.

In the .NET Framework 4.5, several new features were added to Windows Workflow Foundation (WF), including:

State machine workflows, which were first introduced as part of the .NET Framework 4.0.1 (.NET Framework 4 Platform Update 1). This update included several new classes and activities that enabled developers to create state machine workflows. These classes and activities were updated for the .NET Framework 4.5 to include:

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 or 4.5.1 is available for building Windows Store apps for Windows by using C# or Visual Basic. This subset is called .NET for Windows Store apps and is discussed in an overview in the Windows Dev Center.

The Portable Class Library project in Visual Studio 2012 (and later versions) 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 available types and members in your project are automatically restricted to the common types and members across these platforms. For more information, see Cross-Platform Development with the Portable Class Library.