Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article lists the app compatibility issues that were introduced in .NET Framework 4.7, 4.7.1, and 4.7.2.
Because of changes introduced in the .NET Framework 4.7, in some cases the code generated by the JIT compiler in applications running on the .NET Framework 4.7 incorrectly compares two T:System.UInt16
values. For more information, see Issue #11508: Silent bad codegen when passing and comparing ushort args on GitHub.com.
If you encounter issues in the comparison of 16-bit unsigned values in the .NET Framework 4.7, upgrade to the .NET Framework 4.7.1.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
An T:System.InvalidOperationException
can occur in the following scenario:
T:System.Windows.Controls.Primitives.Selector
is a collection with a custom implementation of T:System.Collections.Specialized.INotifyCollectionChanged
.T:System.Collections.Specialized.NotifyCollectionChangedEventArgs
has P:System.Collections.Specialized.NotifyCollectionChangedEventArgs.OldStartingIndex
= -1 (indicating an unknown position).The exception's call stack begins at System.Windows.Threading.Dispatcher.VerifyAccess() at System.Windows.DependencyObject.GetValue(DependencyProperty dp) at System.Windows.Controls.Primitives.Selector.GetIsSelected(DependencyObject element)
. This exception can occur in .NET Framework 4.5 if the application has more than one Dispatcher thread. In .NET Framework 4.7 the exception can also occur in applications with a single Dispatcher thread.
The issue is fixed in .NET Framework 4.7.1.
Upgrade to .NET Framework 4.7.1.
Name | Value |
---|---|
Scope | Minor |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
ScrollIntoView(Object) will work asynchronously when column virtualization is enabled but the column widths have not yet been determined. If columns are removed before the asynchronous work happens, an System.ArgumentOutOfRangeException can occur.
Any one of the following:
Name | Value |
---|---|
Scope | Edge |
Version | 4.6.2 |
Type | Runtime |
WPF applications occasionally crash during application shutdown with an System.ObjectDisposedException thrown by the spellchecker. This is fixed in .NET Framework 4.7 WPF by handling the exception gracefully, and thus ensuring that applications are no longer adversely affected. It should be noted that occasional first-chance exceptions would continue to be observed in applications running under a debugger.
Upgrade to .NET Framework 4.7
Name | Value |
---|---|
Scope | Edge |
Version | 4.6.1 |
Type | Runtime |
Not detectable via API analysis.
An infinite loop can occur during layout of a T:System.Windows.Controls.Grid
under the following circumstances:
Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace=false
.The loop would also happen with more than two rows, or in the analogous case for columns. The issue is fixed in .NET Framework 4.7.1.
Upgrade to .NET Framework 4.7.1. Alternatively, if you don't need the 4.7 allocation algorithm you can use the following configuration setting:
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace=true" />
</runtime>
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
System.Windows.Controls.Ribbon.RibbonGroup background on localized builds was always painted with Transparent brush, resulting in poor UI experience. This is fixed in .NET Framework 4.7 WPF fix by updating the localized resources for System.Windows.Controls.Ribbon.RibbonGroup, which in turn ensures that the correct brush is selected.
Upgrade to .NET Framework 4.7
Name | Value |
---|---|
Scope | Edge |
Version | 4.6.2 |
Type | Runtime |
Not detectable via API analysis.
WPF's Printing APIs using System.Printing.PrintQueue now call Window's Print Document Package API in favor of the now deprecated XPS Print API. The change was made with serviceability in mind; neither users nor developers should see any changes in behavior or API usage. The new printing stack is enabled by default when running in Windows 10 Creators Update. The old printing stack will still continue to work just as before in older Windows versions.
To use the old stack in Windows 10 Creators Update, set the UseXpsOMPrinting
REG_DWORD value of the HKEY_CURRENT_USER\Software\Microsoft\.NETFramework\Windows Presentation Foundation\Printing
registry key to 1
.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
In the .NET Framework 4.6.2 and earlier versions, when the Execute method of a workflow activity throws an exception with a null
value for the Message property, the System.Activities Workflow runtime throws a System.NullReferenceException, masking the original exception.In the .NET Framework 4.7, the previously masked exception is thrown.
If your code relies on handling the System.NullReferenceException, change it to catch the exceptions that could be thrown from your custom activities.
Name | Value |
---|---|
Scope | Minor |
Version | 4.7 |
Type | Runtime |
Starting with the .NET Framework 4.7, the tables created for the SQL Workflow Instance Store (SWIS) by the SqlWorkflowInstanceStoreSchema.sql script use clustered primary keys. Because of this, identities do not support null
values. The operation of SWIS is not impacted by this change. The updates were made to support SQL Server Transactional Replication.
The SQL file SqlWorkflowInstanceStoreSchemaUpgrade.sql must be applied to existing installations in order to experience this change. New database installations will automatically have the change.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
Because of changes introduced in the .NET Framework 4.7, in some cases the code generated by the JIT compiler in applications running on the .NET Framework 4.7 incorrectly compares two T:System.UInt16
values. For more information, see Issue #11508: Silent bad codegen when passing and comparing ushort args on GitHub.com.
If you encounter issues in the comparison of 16-bit unsigned values in the .NET Framework 4.7, upgrade to the .NET Framework 4.7.1.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
CngLightup (used in several higher-level crypto apis, such as System.Security.Cryptography.Xml.EncryptedXml) and System.Security.Cryptography.RSACng in some cases rely on full trust. These include P/Invokes without asserting SecurityPermissionFlag.UnmanagedCode permissions, and code paths where System.Security.Cryptography.CngKey has permission demands for SecurityPermissionFlag.UnmanagedCode. Starting with the .NET Framework 4.6.2, CngLightup was used to switch to System.Security.Cryptography.RSACng wherever possible. As a result, partial trust apps that successfully used System.Security.Cryptography.Xml.EncryptedXml began to fail and throw SecurityException exceptions.This change adds the required asserts so that all functions using CngLightup have the required permissions.
If this change in the .NET Framework 4.6.2 has negatively impacted your partial trust apps, upgrade to the .NET Framework 4.7.1.
Name | Value |
---|---|
Scope | Edge |
Version | 4.6.2 |
Type | Runtime |
Starting with the .NET Framework 4.7.1, the AddressHeaderCollection(IEnumerable<AddressHeader>) constructor throws an ArgumentException if one of the elements is null
. In the .NET Framework 4.7 and earlier versions, no exception is thrown.
If you encounter compatibility issues with this change on the .NET Framework 4.7.1 or a later version, you can opt-out of it by adding the following line to the <runtime>
section of the app.config file:
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.ServiceModel.DisableAddressHeaderCollectionValidation=true" />
</runtime>
</configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.1 |
Type | Runtime |
Starting with the .NET Framework 4.7.1, the default message signing algorithm in WCF for Msmq messages is SHA256. In the .NET Framework 4.7 and earlier versions, the default message signing algorithm is SHA1.
If you run into compatibility issues with this change on the .NET Framework 4.7.1 or later, you can opt-out the change by adding the following line to the <runtime>
section of your app.config file:
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.ServiceModel.UseSha1InMsmqEncryptionAlgorithm=true" />
</runtime>
</configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.1 |
Type | Runtime |
Not detectable via API analysis.
Starting with the .NET Framework 4.7.1, Windows Communication Foundation uses a SHA256 hash to generate random names for named pipes. In the .NET Framework 4.7 and earlier versions, it used a SHA1 hash.
If you run into compatibility issue with this change on the .NET Framework 4.7.1 or later, you can opt-out it by adding the following line to the <runtime>
section of your app.config file:
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.ServiceModel.UseSha1InPipeConnectionGetHashAlgorithm=true" />
</runtime>
</configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.1 |
Type | Runtime |
Not detectable via API analysis.
A Popup with StaysOpen=False is supposed to close when you click outside the Popup. When two or more such Popups are chained (i.e. one contains another), there were many problems, including:
These cases (and other variants) now work as expected.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7.1 |
Type | Runtime |
An T:System.InvalidOperationException
can occur in the following scenario:
T:System.Windows.Controls.Primitives.Selector
is a collection with a custom implementation of T:System.Collections.Specialized.INotifyCollectionChanged
.T:System.Collections.Specialized.NotifyCollectionChangedEventArgs
has P:System.Collections.Specialized.NotifyCollectionChangedEventArgs.OldStartingIndex
= -1 (indicating an unknown position).The exception's call stack begins at System.Windows.Threading.Dispatcher.VerifyAccess() at System.Windows.DependencyObject.GetValue(DependencyProperty dp) at System.Windows.Controls.Primitives.Selector.GetIsSelected(DependencyObject element)
. This exception can occur in .NET Framework 4.5 if the application has more than one Dispatcher thread. In .NET Framework 4.7 the exception can also occur in applications with a single Dispatcher thread.
The issue is fixed in .NET Framework 4.7.1.
Upgrade to .NET Framework 4.7.1.
Name | Value |
---|---|
Scope | Minor |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
An infinite loop can occur during layout of a T:System.Windows.Controls.Grid
under the following circumstances:
Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace=false
.The loop would also happen with more than two rows, or in the analogous case for columns. The issue is fixed in .NET Framework 4.7.1.
Upgrade to .NET Framework 4.7.1. Alternatively, if you don't need the 4.7 allocation algorithm you can use the following configuration setting:
<runtime>
<AppContextSwitchOverrides value="Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace=true" />
</runtime>
Name | Value |
---|---|
Scope | Edge |
Version | 4.7 |
Type | Runtime |
Not detectable via API analysis.
In System.Uri, constructing a file URI containing both a UNC share name and Unicode characters will no longer result in a URI with invalid internal state. The behavior will change only when all of the following are true:
file:
and is followed by four or more slashes.Applications working with URIs consistently containing Unicode could have conceivably used this behavior to disallow references to UNC shares. Those applications should use IsUnc instead.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7.2 |
Type | Runtime |
Uri will no longer throw a NullReferenceException when calling TryCreate on certain relative URIs containing Unicode. The simplest reproduction of the NullReferenceException is below, with the two statements being equivalent:
bool success = Uri.TryCreate("http:%C3%A8", UriKind.RelativeOrAbsolute, out Uri href);
bool success = Uri.TryCreate("http:è", UriKind.RelativeOrAbsolute, out Uri href);
To reproduce the NullReferenceException, the following items must be true:
Users depending on this behavior to disallow relative URIs should instead specify UriKind.Absolute when creating a URI.
Name | Value |
---|---|
Scope | Edge |
Version | 4.7.2 |
Type | Runtime |
.NET Framework 4.7.2 improves chain trust certificate validation when using certificate authentication with transport security with WCF. With this improvement, client certificates that are used to authenticate to a server must be configured for client authentication. Similarly server certificates that are for the authenticating a server must be configured for server authentication. With this change, if the root certificate is disabled, the certificate chain validation fails. The same change was also made to .NET Framework 3.5 and later versions via Windows security roll-up. You can find more information here.This change is on by default and can be turned off by a configuration setting.
Validate if your server and client certification has the required EKU OID. If not, update your certification.
Validate if your root certificate is invalid. If so, update the root certificate.
If you can't update the certificate, you can work around the breaking change temporarily with the following configuration setting. However, opting out of the change will leave your system vulnerable to the security issue.
<appSettings>
<add key="wcf:useLegacyCertificateUsagePolicy" value="true" />
</appSettings>
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.2 |
Type | Runtime |
Not detectable via API analysis.
In .NET Framework 4.6.1, an app setting (dataAnnotations:dataTypeAttribute:disableRegEx
) was introduced that allows users to disable the use of regular expressions in data type attributes (such as System.ComponentModel.DataAnnotations.EmailAddressAttribute, System.ComponentModel.DataAnnotations.UrlAttribute, and System.ComponentModel.DataAnnotations.PhoneAttribute). This helps to reduce security vulnerability such as avoiding the possibility of a Denial of Service attack using specific regular expressions.
In .NET Framework 4.6.1, this app setting to disable RegEx usage was set to false
by default. Starting with .NET Framework 4.7.2, this config switch is set to true
by default to further reduce secure vulnerability for web applications that target .NET Framework 4.7.2 and above.
If you find that regular expressions in your web application do not work after upgrading to .NET Framework 4.7.2, you can update the value of the dataAnnotations:dataTypeAttribute:disableRegEx
setting to false
to revert to the previous behavior.
<configuration>
<appSettings>
...
<add key="dataAnnotations:dataTypeAttribute:disableRegEx" value="false"/>
...
</appSettings>
</configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.2 |
Type | Runtime |
Not detectable via API analysis.
Keytips behavior has been modified to bring parity with behavior on Microsoft Word and Windows Explorer. By checking whether keytip state is enabled or not in the case of a SystemKey (in particular, Key or F11) being pressed, WPF handles keytip keys appropriately. Keytips now dismiss a menu even when it is opened by mouse.
N/A
Name | Value |
---|---|
Scope | Edge |
Version | 4.7.2 |
Type | Runtime |
Not detectable via API analysis.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Learning path
Use advance techniques in canvas apps to perform custom updates and optimization - Training
Use advance techniques in canvas apps to perform custom updates and optimization