Wednesday, November 9, 2011

Update 4.0.2 for the Microsoft .NET Framework 4


Update 4.0.2 for the Microsoft .NET Framework 4 is a platform update that includes a set of new features and bug fixes, based on top customer requests and .NET Framework scenarios.
Platform updates are feature upgrades to the .NET Framework 4. These updates add types and members that developers can target when building new applications. The goal of platform updates is to incrementally expose newer features so that you can build richer applications now, before the next major .NET Framework release.
Update 4.0.2 does not impact your existing .NET Framework 4 applications; you access the new features only when you create a new application that targets the .NET Framework 4.0.2. However, if you have existing .NET Framework 4 applications, you will still be able to take advantage of the bug fixes included with Update 4.0.2.

Quick links

Which package should you install?
Update 4.0.2 for Microsoft .NET Framework 4 consists of three packages:
  • Update 4.0.2 for Microsoft .NET Framework 4 – Design-time Update for Visual Studio 2010 SP1 (KB2544525
  • This package supports the complete design-time experience for the .NET Framework 4.0.2 in Visual Studio 2010 Service Pack 1 (SP1). It configures Visual Studio with new targeting profiles and installs the run-time files, reference assemblies, IntelliSense files, and other dependent Visual Studio files in one step, so you can start writing your code. (This package includes the Run-time Update and the Multi-Targeting Pack.)

    If you want to develop applications that utilize the new features in Update 4.0.2, download Visual Studio 2010 SP1, and then install the Design-time Update.

    Note: You must install Visual Studio 2010 SP1 first, before you can use this package.
  • Update 4.0.2 for Microsoft .NET Framework 4 – Run-time Update (KB2544514)

    This package contains the run-time files for the platform update. It is included in the Design-time Update, but you can install it separately if you don't need the design-time features and just want to deploy your .NET Framework 4.0.2 applications.

    If you want to configure a computer for deploying applications that target the .NET Framework 4.0.2, install the Run-time Update after you install the .NET Framework 4 or .NET Framework 4 Client Profile. You should redistribute the Run-time Update (along with the .NET Framework 4) with your applications that target the .NET Framework 4.0.2.
  • Multi-Targeting Pack for Microsoft .NET Framework 4.0.2 (KB2544526)

    This package contains the reference assemblies and IntelliSense files for the Visual Studio development environment. The Multi-Targeting Pack is included in the Design-time Update, and is also available as an independent package for versions after Visual Studio 2010.

    If you want to configure the .NET Framework 4.0.2 on a computer that contains Visual Studio 11 Developer Preview or later, install the independent package for the Multi-Targeting Pack.

New features in Update 4.0.2

Update 4.02 supports AlwaysOn and LocalDB with SqlClient. Additionally, because this update builds on the previous update, it also includes the features from Update 4.0.1 (also known as Microsoft .NET Framework 4 Platform Update 1). Here's the full list of features included in Update 4.0.2:
  • AlwaysOn support in SqlClient
New 4.0.2 feature
  • SQL Server Express Local Database Runtime support in SqlClient
New 4.0.2 feature
  • StateMachine (including designer support)
Existing 4.0.1 feature
  • SqlWorkflowInstanceStore on SQL Azure
Existing 4.0.1 feature
  • Compensation for custom hosts
Existing 4.0.1 feature

Note that we didn't make any changes to the features that were shipped in Update 4.0.1.
To get the full details about all the features and bug fixes included in Update 4.0.2, see the following Knowledge Base articles:
  • 2544514 - Update 4.0.2 for Microsoft .NET Framework 4 – Run-time Update
  • 2478063 - Update 4.0.1 for Microsoft .NET Framework 4 – Run-time Update
The MSDN Library includes the following documentation for these features:

.NET Framework Compatibility

Compatibility with version 4.5: All features and bug fixes included in this update will also be available in the .NET Framework 4.5. This means that the applications you build for the .NET Framework 4.0.2 will continue to work on the .NET Framework 4.5. You can read more about version compatibility in the entryCompatibility of .NET Framework 4.5 in the .NET Blog.
Compatibility with Update 4.0.1: An application that is built for the .NET Framework 4.0.1 will run on a computer that has the .NET Framework 4 and the 4.0.2 Run-time Update installed. We recommend that you upgrade your .NET Framework 4.0.1 applications to the 4.0.2 run-time, but this is not required.
How to create new applications with Update 4.0.2
When you install the Design-time Update for Visual Studio 2010 SP1 (KB2544525) you will be able to create new applications that target the .NET Framework 4.0.2 from Visual Studio. Follow these steps:
  1. Start Visual Studio 2010 SP1.
  2. Create a new project (FileNewProject).
  3. In the New Project dialog box, set the target framework for the project to .NET Framework 4.0.2.
    Note: The target framework list is also available through project properties.
  4. Start writing code and use the designer to build your .NET Framework 4.0.2 application.

The Design-time Update adds two new profiles to Visual Studio:
  • NET Framework 4.0.2
  • NET Framework 4.0.2 Client Profile
To choose either profile or change the profile after a project has been created, right-click the project in Solution Explorer, choose Properties, and choose the desired profile from the Target framework list.
When you select one of these profiles, the new features and State Machine activities will become available in the Toolbox.

AlwaysOn support in SqlClient

In SQL Server code named "Denali," AlwaysOn is introduced as a High Availability topology. With this topology, secondary nodes can be accessed by read workloads. To do this, secondary nodes must only accept read-only connections. This operation requires a special intent lock to be passed together with a connection. To meet this requirement, and also to keep the connectivity information decoupled from the application, SqlClient includes the following new connection string keywords:
  • ApplicationIntent
    This keyword is passed as a connection string parameter. When this keyword is used, applications can directly connect to a read-only secondary server, or can be automatically redirected to secondary servers in an availability group.
  • MultiSubnetFailover
    This keyword supports fast failover connectivity for geographically-distributed topologies.
For more information about AlwaysOn, visit the following Microsoft website:

SQL Server Express Local Database Runtime support in SqlClient

SQL Server Express LocalDB is a new installation and execution mode of SQL Server Express that runs as a stand-alone executable and that requires a minimum amount of effort for installation. When developers connect to database files directly, a transparent SQL Server Express infrastructure runs in the background. For current SQL Server technology, LocalDB offers a Run As Normal User (RANU) user instance in a smaller package.

SqlClient adds support for SQL Server Express LocalDB connectivity that can be used by a developer.

For more information about SQL Server Express LocalDB, visit the following Microsoft website:

A new DbProviderFactories.GetFactory overload

With this overload, you can use a valid DbConnection object to obtain a DbProviderFactoryobject. 

For more information about the DbProviderFactory methods, visit the following MSDN website:
For more information about the supported features from Update 4.0.1, click the following article number to view the article in the Microsoft Knowledge Base:
2478063  Microsoft .NET Framework 4 Platform Update 1 - Runtime Update
Issues that this update resolves
Issue 1
Consider the following scenario:
  • You create a .NET Framework application that targets the Microsoft .NET Framework 4.0.1 or the Microsoft .NET Framework 4.0.1 Client Profile.
  • You publish the application.
  • You install the application. ClickOnce is used to install the application. 
In this scenario, the installation fails, and you receive an error message that contains the following text:
Version 4.0.1 is required
Issue 2
Consider the following scenario:
  • You create a Windows Presentation Foundation (WPF) application.
  • You set a window to be a child window of two windows. 
In this scenario, WPF reports incorrect child-window dimensions.

Note After you install this update, WPF returns the correct dimensions of the child window.

Visual Studio 2010 support


To use any new feature installed by this update, install the following update, and then develop applications in Microsoft Visual Studio 2010 Service Pack 1 (SP1):
2544525  Visual Studio 2010 SP1 – Design-time Update for Microsoft .NET Framework 4.0.2
Note This update installs a multi-targeting pack and other supporting files for the development environment. After you install these files, you can develop applications for the .NET Framework 4.0.2.



No comments:

Post a Comment