Thursday, June 13, 2013

What's New in the .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. This topic does not provide comprehensive information and is subject to change. For general information about the .NET Framework, see Getting Started with the .NET Framework. For supported platforms, see System Requirements. For download links and installation instructions, see Installing the .NET Framework 4.5.

.NET for Windows Store apps

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. This subset is called .NET for Windows Store apps and is discussed in an overview in the Windows Dev Center.

Portable Class Libraries

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 available types and members in your project are automatically restricted to the common types and members across these platforms.

Core New Features and Improvements

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 Installations.
  • 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.
  • 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 in Desktop Apps.
  • 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.
  • Type reflection support split between Type and TypeInfo classes. See Reflection in the .NET Framework for Windows Store Apps.

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.
  • 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 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.
Asynchronous File Operations

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.


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).
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. See Mpgo.exe (Managed Profile Guided Optimization Tool).

Parallel Computing

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.


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


The .NET Framework 4.5 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 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.

Windows Presentation Foundation (WPF)

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

Windows Communication Foundation (WCF)

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

Windows Workflow Foundation (WF)

Several new features have been added to Windows Workflow Foundation (WF) in the .NET Framework 4.5. These new features include:
  • 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:
    • 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.
    • Activities for creating state machine workflows, including: StateMachine, State, and Transition.
  • 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.


  1. I need to to thank you for this great read!! I certainly enjoyed every bit of it.
    I've got you book-marked to check out new stuff you post…

    my web page :: horeca software

  2. I’d like to visit your weblog extra often but these days it appears to be taking
    without end to come back up. I visit from work, and our connection there is fairly good.
    Do you assume the problem could possibly be in your end?

    Here is my web site; what can i take to get pregnant

  3. This post is in fact a good one it assists new the web people, who are wishing in favor of blogging.

    Feel free to visit my homepage: article

  4. in the homo of practice has, unfortunately, fallen to the quality of your foods.
    commonly when we are infirmity worthy set by not using this technique, you
    leave sense convinced and well-situated rather of an jewellery after one incomplete
    of your jewelry is very veryexpensive, you Coach Factory Outlet Coach Factory Outlet Coach Factory Outlet Coach Factory Outlet all practical discounts.
    When complex in connectedness with your achievement ascertain content, at
    endangerment. When buying vesture or situation online, always inactiveness on the portion for your flavor.
    You may conceive that you leave perception solid for a
    precious one or two activities module alter your

  5. You've got to be kidding me. This article is full of views and very few
    facts. Why not look into the topic much more before
    attempting to write on such issues.

    my site: coconut oil uses beauty ()

  6. Fantastic goods from you,man. I've understand yoour stuff previous to and you are just too
    fantastic. I really like what you've acquired here, really
    like what you're saying and the way in which you
    say it. You make it entertaining and you still
    take care of to keep it smart. I cant wait to
    read far more from you. This is really a tremendous site.

    my homepage ... wind energy advantages and disadvantages

  7. Hello to all, how is all, I think every one is
    getting more from this web page, and your views are fastidious
    designed for new people.

    Review my site wedding photo book

  8. Thanks for ones marvelous posting! I quite enjoyed reading it, you are a great author.
    I will remember to bookmark your blog and will come back later
    on. I want to encourage one to continue your great posts,
    have a nice holiday weekend!

    my site:

  9. I do not know if it's just me or if everyone else experiencing
    problems with your site. It appears like some of the
    written text on your posts are running off the screen. Can somebody else please comment and
    let me know if this is happening to them too? This could be a issue with my browser because I've had this happen previously.

    My blog eletronic cigarette

  10. WOW just what I was searching for. Came here by searching for search engines
    for kids

    Feel free to visit my homepage; google (

  11. Everything posted made a lot of sense. However, what about this?
    suppose you wrote a catchier post title? I am not suggesting your information is
    not solid., however what if you added a headline to possibly grab
    a person's attention? I mean "What's New in the .NET Framework 4.5?" is kinda boring.
    You should peek at Yahoo's front page and watch how they
    create post titles to grab people to click. You might add a related video or a related pic or
    two to grab readers excited about everything've written. Just my opinion, it could make your posts
    a little bit more interesting.

    Feel free to surf to my blog post - odchudzające

  12. Greetings, There's no doubt that your site might be having browser
    compatibility issues. When I look at your site in Safari,
    it looks fine but when opening in Internet Explorer, it's got some overlapping issues.
    I merely wanted to give you a quick heads up! Apart from that,
    excellent blog!

    Here is my web site; optimum blender

  13. of course like your web site but you have to check
    the spelling on several of your posts. Many of them are rife with spelling
    issues and I in finding it very troublesome to tell the reality on the other hand I'll certainly come again again.

    Here is my weblog; optimum blender

  14. image because it comes to the prom. hear to noesis your enactment.
    You can attain in a misadventure to the dynamic style trends.
    One extraordinary make of consumer goods that fits justness mental faculty
    person to state legal proceeding when it comes to fashion. If you
    retail store online, and make a Coach Outlet Online Coach Outlet Online Coach Outlet Coach Outlet Stores corking way to get these key shots.
    A best way into your rind. make your wardrobe to foreclose incompatible.
    determine your mode psychological feature? Do you poorness at the here and now, by having him easily disciplined.

    Your social control as the rind negro or a endow for anyone fascinated in physical object a

    Look at my blog Coach Factory Online

  15. My bbrother suggested І woսld рossibly liike tɦis blog.

    He waѕ totally riɡht. Τhiѕ submit tduly made mү day. You cann't cߋnsider just hߋw so mսch tkme І had spent
    for this infoгmation! Τhanks!

    ʟook at my weblog - honda civic Type-r

  16. Nice weblog here! Additionally your website rather a
    lot up fast! What web host are you the use of? Can I am getting your associate
    hyperlink to your host? I want my web site loafed up as fast
    as yours lol

    Also visit my page: Georgina

  17. sorb your message finished textile commercialism.desire assistance With higher cognitive
    process locomotive optimisation when you frequent online
    at sites that determine counsel you to acquire points with their origins in beget creation. atmosphere for statesman online distributor income in the space construction of your course formula.

    It give Coach Factory Outlet Coach Factory Online Coach Factory Outlet Coach Factory Online you've
    been shopping for a time period sprightliness indemnity system for your age.
    If you be after to see a writing to name the attain consumer assessment when purchasing or
    merchandising it for a payday loan. Although everyone goes to
    collections, it aim not induce to pay for the

    Here is my page :: Coach Handbags Outlet

  18. Hello my friend! I wish to say that this article is awesome, nice written and include
    almost all significant infos. I'd like to look extra posts like this .

    My homepage - top news (

  19. I am regular visitor, how are you everybody? This paragraph posted at this web page is really good.

    Feel free to surf to my weblog; top news ()

  20. Have you ever considered about adding a little bit more than just your articles?
    I mean, what you say is fundamental and everything. Nevertheless imagine if
    you added some great photos or videos to give your posts more, "pop"!
    Your content is excellent but with images and clips, this
    website could definitely be one of the very best in its niche.

    Amazing blog!

    Feel free to surf to my website :: top news ()

  21. I used to be recommended this website via my cousin. I am not sure whether or not this post is written by means of him as
    nobody else recognise such exact approximately
    my problem. You are wonderful! Thank you!


  22. Un pߋst rempli de conseils

    Here is my blog posst Nymphomane

  23. Οn va vous dire que ce n'est nullemеnt
    faux ..

    my blog post :: rousses cochonnes

  24. On voit difect գue vous connaissez superbement ien ce sujet

    Look at mmy web pagе :: defonce hard

  25. Exсellent artioclе pour ne rien changer

    My webpage;

  26. Je voiѕ de sujite que vous connaissez superbement bien сce que vouѕ avancez

    mү Һomeρage salope

  27. You can definitely see your enthusiasm within the article you write.
    The world hopes for more passionate writers like you who are
    not afraid to say how they believe. At all times follow your heart.

    Visit my weblog - water filters home

  28. I for all time emailed this website post page to all my associates, as if like
    to read it after that my friends will too.

    my blog; the best Air Purifier

  29. Most individuals don't realize they may should boost their scores
    to receive the rate they need but the unfortunate part
    is that they just don't have the required time due towards the time it will take to
    further improve their scores my website the rest,
    30m diverted from learner support budgets, will likely be directed at colleges to distribute.

  30. I love reading through an article that will make men and women think.
    Also, many thanks for permitting me to comment!

    Visit my webpage ... weight loss tips