An update is available for the .NET Framework 4.5 in Windows 8, Windows RT and Windows Server 2012: May 2013

Applies to: .NET Framework 4.5Windows 8Windows RT


An update for the .NET Framework 4.5 is available. For more information about the issues that this update resolves, see the "Issues that this update resolves" section.

More Information

How to obtain this update

Windows Update

This update is available from Windows Update

Microsoft Download Center

The following file is available for download from the Microsoft Download Center:

Download Download the package now.

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Restart requirement

You do not have to restart the computer after you apply this update if the affected files are not being used.

Known issue

After you install this update for the .NET Framework 4.5, you might be unable to open or create C++ or JavaScript files or projects. To resolve this issue, install the Visual Studio 2012 update that is described in the Knowledge Base (KB) article 2781514.

File information

The global version of this update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Issues that this update resolves

This update resolves the Windows Presentation Foundation (WPF), common language runtime (CLR), Windows Forms, and XML issues that are described in the following Knowledge Base (KB) article:
2750149 An update is available for the .NET Framework 4.5 in Windows 8, Windows RT and Windows Server 2012: January 2013


Issue 1

You receive an incorrect value from the DateTime.TryParse method when you use codes that resemble the following:

DateTime dt = DateTime.Parse("4/21 5pm");

if (DateTime.TryParse("4/21 5pm", out dt))
Note In this example, the DateTime.TryParse method incorrectly returns the time of 4:00 P.M. as today’s date.


After you install the hotfix, the method tries to parse this specific pattern correctly.

To enable this hotfix, add the following code in the application configuration file:

<EnableAmPmParseAdjustment enabled=”1” />
Note the hotfix does not affect the system's time and date settings.

Issue 2
When you run the following code pattern by using open generics, an unhandled exception occurs at run time:

interface ITest2<T>
void Execute();

class TestClass2<T> : ITest2<T>
public void Execute()

class Program
static void Main(string[] args)
var catalog = new AssemblyCatalog(typeof(Program).Assembly);
var container = new CompositionContainer(catalog);
var test2 = container.GetExportedValues<ITest2<string>>();

Issue 3
You receive a CryptographicException error when you parse the System.Security.Cryptography.Oid object.

Issue 4
In a multithread console application, the Console.ReadKey method may block the call to the Console.InputEncoding property from another thread.

Issue 5
You receive an access denied error when you try to install an assembly that is shared together with Visual Studio in the Global Assembly Cache (GAC). Additionally, The effected assembly can be broken when it is removed from the system. This issue cannot be resolved even after you restart the computer.

Issue 6
The ConcurrentQueue<T>.TryPeek method returns true. However, the object returned is null.


Issue 1
Assume that you try to call the PrintQueue.AddJob(string jobName, string documentPath, bool fastCopy) method to print an XML Paper Specification (XPS) document on an XPS printer, and the fastCopy parameter is set to true. In this situation, the following issues occur:
  • Print tickets that are embedded in the document are ignored.
  • The preview dialog box pops up in a loop.

Issue 2
When the Content property of a ContentControl control (such as, a Button control) is set to a RoutedCommand command, the control cannot display the name of the routed command. For example, you use the following code to set the ApplicationCommands.Paste command to a Button control in the Microsoft .NET Framework 4.5 or in the Microsoft .NET Framework 4:
<Button Content="{x:Static ApplicationCommands.Paste}" /> 
In this situation, the Button incorrectly displays "System.Windows.Input.SecureUICommand" in the .NET Framework 4.5. However, the Button correctly displays "Paste" in the .NET Framework 4.

Issue 3
Assume that a large collection is bound to the control that supports multiple selections, such as ListBox or DataGrid. When you call the SelectedItems.Add method, you experience slow performance even if the added item is near the beginning of the collection.

Note In .NET Framework 4, you experience slow performance when the added item is near the end of the collection.

Issue 4
The hit target for content that contains small-sized text is larger than the content. When you click outside the actual bounds of the content, a click event or another corresponding event is triggered. This issue occurs when the text size decreases and the scaling factors increase.

Issue 5When you run a .NET Framework 4.5-based WPF application that has a ToggleButton control in Windows 8, the visual appearance of the application does not change when the control is turned on.

Issue 6Assume that a .NET Framework 4.5-based WPF application that uses semi-transparent windows (Windows.AllowsTransparency=True) is running in Windows 8. When the window is resized, the application crashes, and the following unhandled exception is displayed:


Issue 7
Assume that you change a selector property (such as, the SelectedItem property) or ComboBox.Text property by using a binding path that contains a static property. In this situation, the binding does not react to the changes. Specifically, the new value is not written to the data item.

Issue 8
When you run a .NET Framework 4.5-based WPF application on a computer that contains multiple display adapters, black bars can appear on the WPF window. This typically occurs if the WPF window is dragged from a monitor on one adapter to another monitor on a different adapter.

Issue 9
When you encounter unhandled exceptions in Windows Forms content that is hosted in a .NET Framework 4.5-based WPF application, the WPF application crashes. For example, you encounter an unhandled exception when a WPF application uses the <WindowsFormsHost> XAML object element.

Issue 10
When you type inside a Combo Box control that received focus for the first time by using the TAB key, you receive a NullReferenceException exception and the WPF application crashes.

Windows Forms

Issue 1
Assume that you define a custom control that includes a property that can be designer-serialized, and comes with a [DefaultValue()] attribute that results in implicit type casting.

For example, the following property type is "short" and the default value is specified as an "Int32":

public short Number { get; set; }
In this scenario, when Visual Studio Windows Forms Designer serializes or de-serializes this control, a System.ArgumentException is thrown.

Issue 2
Consider the following scenario:
  • You define a base interface and a derived interface.
  • You hide the base interface property by using a "new" modifier in the derived interface. For example, you use the following code:

    public interface IInterfaceA
    int PropertyA { get; set; }
    int PropertyB { get; set; }
    public interface IInterfaceB : IInterfaceA
    new int PropertyA { get; set; }
    int PropertyD { get; set; }
  • You use the derived interface as the argument in the ListBindingHelper.GetListItemPropertiesAPI.

In this scenario, the properties that are defined on the derived interface are returned in the .NET Framework 4. This occurs because the reflection does not return properties that are defined in the base class. However, in .NET Framework 4.5, properties from the base class are included. Furthermore, the ListBindingHelper.GetListItemProperties API returns two instances of a property that is called "PropertyA".


This update reverts the ListBindingHelper.GetListItemProperties API to the .NET Framework 4 behavior. This API is invoked at design time when IInterfaceB is set as a data source on a control (such as, a DataGridView control).


Consider the following scenario:
  • You use System.Messaging or MSMQ in a workgroup environment.
  • You use the MessageQueue.GetPrivateQueuesByMachine method to retrieve an array of MessageQueue objects for all private queues on a remote computer in the workgroup.
In this scenario, you encounter a MessageQueueException exception, and the following error message is received:

Invalid queue path name.

Windows Communication Foundation (WCF)

In the .NET Framework 4.5, WCF introduces a new method named "Reflection Emit" that generates the XML Serialization assembly. This method enables scenarios where the client application cannot write a temporary serialization assembly to disk. In some cases, this may cause issues after you upgrade to the .NET Framework 4.5.

The ability to opt out of this new behavior and revert to the WCF 4 XML serialization is documented in the following KB article:
2748720 Serialization or deserialization failures when you run existing XML serialization code in WCF 4.5
In a .NET Framework 4.5-based application, you can use the following code as the workaround that is described in KB 2748720:

<configuration>     <system.xml.serialization>         <xmlSerializer useLegacySerializerGeneration="true"/> </system.xml.serialization> <configuration> 
Assume that you also use the same application.config file or web.config file to target both the .NET Framework 4 and the .NET Framework 4.5. In this situation, you encounter an exception that indicates the <xmlserializer> element cannot be recognized under the <system.xml.serialization> attribute.

For applications that try to target the .NET Framework 4 and the .NET Framework 4.5, we recommend that you apply the following <appSetting> configuration to a replace the previous switch:

<appSettings>     <add key="System:Xml:Serialization:UseLegacySerializerGeneration" value="true"/> </appSettings> 
  • Both switches work in the .NET Framework 4.5. However, the <appSettings> switch will make sure that the app.config file or web.config file can be transferred between the .NET Framework 4.0 and the .NET Framework 4.5. If you apply both the switches, only the <appSettings> switch will be used.
  • When a .NET Framework 4.0 application uses the "UseLegacySerializerGeneration" configuration element, the application returns a configuration error.

This update also resolves the following issues after you upgrade to the .NET Framework 4.5.

Issue 1
When you deserialize simple arrays that are serialized as an XmlAttribute, the operation fails. Additionally, you receive the following error message:
System.XML.XmlException ‘EndElement’ is an invalid XmlNode Type.
After you upgrade to .NET Framework 4.5, IIS may return an HTTP400 - 'Bad Request' error.

Issue 2
Consider the following scenario:
  • A base class "A" and a derived class "B" try to serialize or deserialize an object of "B".
  • A virtual property is defined in "A" and is overridden by "B".
In this scenario, the serializer outputs the property that is defined in "A" instead of "B".