Runtime changes affect all apps that are running under a .NET Framework it was not compiled against and that use a particular feature.
In the topics that describe runtime changes, we have classified individual items by their expected impact, as follows:
This is a significant change that affects a large number of apps or that requires substantial modification of code.
This is a change that affects a small number of apps or that requires minor modification of code.
This is a change that affects apps under very specific scenarios that are not common.
This is a change that has no noticeable effect on the app's developer or user. The app should not require modification because of this change.
If you are migrating from the .NET Framework 4.7 to 4.7.2, review the following topics for application compatibility issues that may affect your app:
Allow Unicode in URIs that resemble UNC shares
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:
The URI has the scheme file: and is followed by four or more slashes.
The host name begins with an underscore or other non-reserved symbol.
The URI contains Unicode characters.
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.
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.
Improved WCF chain trust certificate validation for Net.Tcp certificate authentication
.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.
How to opt out of the change: 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.
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.
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::
WCF MsmqSecureHashAlgorithm default value is now SHA256
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:
WCF PipeConnection.GetHashAlgorithm now uses SHA256
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:
Crash in Selector when removing an item from a custom INCC collection
An T:System.InvalidOperationException can occur in the following scenario:
The ItemsSource for a T:System.Windows.Controls.Primitives.Selector is a collection with a custom implementation of T:System.Collections.Specialized.INotifyCollectionChanged.
The selected item is removed from the collection.
The T:System.Collections.Specialized.NotifyCollectionChangedEventArgs has P:System.Collections.Specialized.NotifyCollectionChangedEventArgs.OldStartingIndex = -1 (indicating an unknown position).
The exception's callstack 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.
Keytips behavior improved in WPF
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.
Resizing a Grid can hang
An infinite loop can occur during layout of a T:System.Windows.Controls.Grid under the following circumstances:
Row definitions contain two *-rows, both declaring a MinHeight and a MaxHeight.
Content of the *-rows doesn't exceed the corresponding MaxHeight
The Grid's available height is exceeded by the first MinHeight (plus any other fixed or Auto rows)
The app targets .NET Framework 4.7, or opts in to the 4.7 allocation algorithm by setting 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: