This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
This article lists the app compatibility issues that were introduced in .NET Framework4.8 and4.8.1.
In .NET Framework 4.7.2 and earlier versions, managed cryptographic provider classes such asSHA256Managed throw aCryptographicException when the system cryptographic libraries are configured in FIPS mode. These exceptions are thrown because the managed versions have not undergone FIPS (Federal Information Processing Standards) 140-2 certification, as well as to block cryptographic algorithms that were not considered to be approved based on the FIPS rules. Because few developers have their development machines in FIPS mode, these exceptions are frequently thrown only on production systems.Applications that target .NET Framework 4.8 and later versions automatically switch to the newer, relaxed policy, so that aCryptographicException is no longer thrown by default in such cases. Instead, the managed cryptography classes redirect cryptographic operations to a system cryptography library. This policy change effectively removes a potentially confusing difference between developer environments and the production environments and makes native components and managed components operate under the same cryptographic policy.
If this behavior is undesirable, you can opt out of it and restore the previous behavior so that aCryptographicException is thrown in FIPS mode by adding the followingAppContextSwitchOverrides configuration setting to the<runtime> section of your application configuration file:
<runtime> <AppContextSwitchOverrides value="Switch.System.Security.Cryptography.UseLegacyFipsThrow=true" /></runtime>
If your application targets .NET Framework 4.7.2 or earlier, you can also opt in to this change by adding the followingAppContextSwitchOverrides configuration setting to the<runtime> section of your application configuration file:
<runtime> <AppContextSwitchOverrides value="Switch.System.Security.Cryptography.UseLegacyFipsThrow=false" /></runtime>
Name | Value |
---|---|
Scope | Edge |
Version | 4.8 |
Type | Retargeting |
The Windows Forms Framework is continuing to improve how it works with accessibility technologies to better support Windows Forms customers. These include the following changes:
How to opt in or out of these changesIn order for the application to benefit from these changes, it must run on the .NET Framework 4.8. The application can opt in into these changes in either of the following ways:
<runtime>
section of the app config file and setting it tofalse
, as the following example shows.<?xml version="1.0" encoding="utf-8"?><configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/> </startup> <runtime> <!-- AppContextSwitchOverrides value attribute is in the form of 'key1=true/false;key2=true/false --> <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false" /> </runtime></configuration>
Note that to opt in to the accessibility features added in .NET Framework 4.8, you must also opt in to accessibility features of .NET Framework 4.7.1 and 4.7.2 as well. Applications that target the .NET Framework 4.8 and want to preserve the legacy accessibility behavior can opt in to the use of legacy accessibility features by explicitly setting this AppContext switch totrue
.Enabling the keyboard ToolTip invocation support requires adding theSwitch.System.Windows.Forms.UseLegacyToolTipDisplay=false
line to the AppContextSwitchOverrides value:
<AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false;Switch.UseLegacyAccessibilityFeatures.2=false;Switch.UseLegacyAccessibilityFeatures.3=false;Switch.System.Windows.Forms.UseLegacyToolTipDisplay=false" />
Note that enabling this feature requires opting in to the aforementioned accessibility features of .NET Framework 4.7.1 - 4.8. Also, if any of the accessibility features are not opted in but the tooltip display feature is opted in, a runtimeNotSupportedException will be thrown on the first access to these features. The exception message indicates that keyboard ToolTips require accessibility improvements of level 3 to be enabled.
Use of OS-defined colors in High Contrast themes
Improved Narrator support
Improved CheckedListBox Accessibility support
Improved ComboBox Accessibility support
Enabled UI Automation support for theComboBox control, with the ability to use UI Automation notifications and other UI Automation features.Improved DataGridView Accessibility support
Enabled UI Automation support forDataGridView control with ability to use UI Automation notifications and other UI Automation features.
The UI Automation element which corresponds to theDataGridViewComboBoxEditingControl orDataGridViewTextBoxEditingControl is now a child of corresponding editing cell.
Improved LinkLabel Accessibility support
Improved ProgressBar Accessibility support
Improved PropertyGrid Accessibility support
Improved ToolStrip support
Improved Visual cues
Invoking controls' ToolTips with a keyboard
Name | Value |
---|---|
Scope | Major |
Version | 4.8 |
Type | Retargeting |
High Contrast improvements
Screen reader interaction improvements
LiveRegion support
Screen readers, such as Narrator, help people understand the user interface (UI) of an application, usually by describing the UI element that currently has focus. However, if a UI element changes somewhere in the screen and it does not have the focus, the user may not be informed and miss important information. LiveRegions are meant to solve this problem. A developer can use them to inform the screen reader or any otherUI Automation client that an important change has been made to a UI element. The screen reader can then decide how and when to inform the user of this change. The LiveSetting property also lets the screen reader know how important it is to inform the user of the change made to the UI.
How to opt in or out of these changes
In order for the application to benefit from these changes, it must run on .NET Framework 4.7.1 or later. The application can benefit from these changes in either of the following ways:
Target .NET Framework 4.7.1. This is the recommended approach. These accessibility changes are enabled by default on WPF applications that target .NET Framework 4.7.1 or later.
It opts out of the legacy accessibility behaviors by adding the followingAppContext Switch in the<runtime>
section of the app config file and setting it tofalse
, as the following example shows.
<?xml version="1.0" encoding="utf-8"?><configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/> </startup> <runtime> <!-- AppContextSwitchOverrides value attribute is in the form of 'key1=true/false;key2=true/false' --> <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false" /> </runtime></configuration>
Applications that target .NET Framework 4.7.1 or later and want to preserve the legacy accessibility behavior can opt in to the use of legacy accessibility features by explicitly setting this AppContext switch totrue
.For an overview of UI automation, seeUI Automation Overview.
Name | Value |
---|---|
Scope | Major |
Version | 4.7.1 |
Type | Retargeting |
In WPF applications usingnon-adorner based text selection forTextBox andPasswordBox, developers may now set the newly added SelectionTextBrush property in order to alter the rendering of the selected text. By default, this color changes withHighlightTextBrushKey. If non-adorner based text selection is not enabled, this property does nothing.
Once non-adorner based text selection is enabled, you can use thePasswordBox.SelectionTextBrush andSelectionTextBrush property to change the appearance of the selected text. This can be achieved using XAML:
<TextBox SelectionBrush="Red" SelectionTextBrush="White" SelectionOpacity="0.5"Foreground="Blue" CaretBrush="Blue">This is some text.</TextBox>
Name | Value |
---|---|
Scope | Major |
Version | 4.8 |
Type | Retargeting |
In .NET Framework 4.7.2 and earlier versions, when WPF was run in Per-Monitor Aware mode, controls hosted withinHwndHost were not sized correctly after DPI changes, such as when moving applications from one monitor to another. This fix ensures that hosted controls are sized appropriately.
In order for the application to benefit from these changes, it must run on the .NET Framework 4.7.2 or later, and it must opt-in to this behavior by setting the followingAppContext Switch in the<runtime>
section of the app config file tofalse
, as the following example shows.
<?xml version="1.0" encoding="utf-8"?><configuration><startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup><runtime><!-- AppContextSwitchOverrides value attribute is in the form of 'key1=true/false;key2=true/false --><AppContextSwitchOverrides value="Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier2OrGreater=false" /></runtime></configuration>
Name | Value |
---|---|
Scope | Major |
Version | 4.8 |
Type | Retargeting |
The Windows Workflow Foundation (WF) workflow designer is improving how it works with accessibility technologies. These improvements include the following changes:
Microsoft.Activities.AddToDictionary<TKey,TValue>
,Microsoft.Activities.RemoveFromDictionary<TKey,TValue>
, etc.).If you have an application with a re-hosted workflow designer, your application can benefit from these changes by performing either of these actions:
<runtime>
section of the app.config file and set it tofalse
, as the following example shows.<?xml version="1.0" encoding="utf-8"?><configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/> </startup> <runtime> <!-- AppContextSwitchOverrides value attribute is in the form of 'key1=true/false;key2=true/false --> <AppContextSwitchOverrides value="Switch.UseLegacyAccessibilityFeatures=false" /> </runtime></configuration>
Applications that target the .NET Framework 4.7.1 or later and want to preserve the legacy accessibility behavior can opt in to the use of legacy accessibility features by explicitly setting this AppContext switch totrue
.
Name | Value |
---|---|
Scope | Minor |
Version | 4.7.1 |
Type | Retargeting |
To support debugging with Visual Studio, the Workflow runtime generates a checksum for a workflow XAML file using a hashing algorithm. In the .NET Framework 4.6.2 and earlier versions, workflow checksum hashing used the MD5 algorithm, which caused issues on FIPS-enabled systems. Starting with the .NET Framework 4.7, the default algorithm was changed to SHA1. Starting with the .NET Framework 4.8, the default algorithm was changed to SHA256.
If your code is unable to load workflow instances or to find appropriate symbols due to a checksum failure, try setting theAppContext
switch "Switch.System.Activities.UseSHA1HashForDebuggerSymbols" totrue
. In code:
System.AppContext.SetSwitch("Switch.System.Activities.UseSHA1HashForDebuggerSymbols", true);
Or in configuration:
<configuration> <runtime> <AppContextSwitchOverrides value="Switch.System.Activities.UseSHA1HashForDebuggerSymbols=true" /> </runtime></configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.8 |
Type | Retargeting |
The Workflow Runtime in keeps a cache of workflow definitions defined in XOML. The SqlTrackingService also keeps a cache that is keyed by strings. These caches are keyed by values that include checksum hash value. In the .NET Framework 4.7.2 and earlier versions, this checksum hashing used the MD5 algorithm, which caused issues on FIPS-enabled systems. Starting with the .NET Framework 4.8, the algorithm used is SHA256.There shouldn't be a compatibility issue with this change because the values are recalculated each time the Workflow Runtime and SqlTrackingService is started. However, we have provided quirks to allow customers to revert back to usage of the legacy hashing algorithm, if necessary.
If this change presents a problem when executing workflows, try setting one or both of theAppContext
switches:
System.AppContext.SetSwitch("Switch.System.Workflow.Runtime.UseLegacyHashForWorkflowDefinitionDispenserCacheKey", true);System.AppContext.SetSwitch("Switch.System.Workflow.Runtime.UseLegacyHashForSqlTrackingCacheKey", true);
Or in the configuration file (this needs to be in the config file for the application that is creating theWorkflowRuntime object):
<configuration><runtime><AppContextSwitchOverrides value="Switch.System.Workflow.Runtime.UseLegacyHashForWorkflowDefinitionDispenserCacheKey=true" /><AppContextSwitchOverrides value="Switch.System.Workflow.Runtime.UseLegacyHashForSqlTrackingCacheKeytrue" /></runtime></configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.8 |
Type | Retargeting |
To support debugging XOML-based workflows with Visual Studio, when workflow projects containing XOML files build, a checksum of the contents of the XOML file is included in the code generated as aWorkflowMarkupSourceAttribute.MD5Digest value. In the .NET Framework 4.7.2 and earlier versions, this checksum hashing used the MD5 algorithm, which caused issues on FIPS-enabled systems. Starting with the .NET Framework 4.8, the algorithm used is SHA256. To be compatible with the WorkflowMarkupSourceAttribute.MD5Digest, only the first 16 bytes of the generated checksum are used.This may cause problems during debugging. You may need to re-build your project.
If re-building your project does not solve the problem, try setting theAppContext
switch "Switch.System.Workflow.ComponentModel.UseLegacyHashForXomlFileChecksum" to true.In code:
System.AppContext.SetSwitch("Switch.System.Workflow.ComponentModel.UseLegacyHashForXomlFileChecksum", true);
Or in a configuration file (this needs to be in MSBuild.exe.config for the MSBuild.exe that you are using):
<configuration><runtime><AppContextSwitchOverrides value="Switch.System.Workflow.ComponentModel.UseLegacyHashForXomlFileChecksum=true" /></runtime></configuration>
Name | Value |
---|---|
Scope | Minor |
Version | 4.8 |
Type | Retargeting |
No app compatibility issues were introduced in .NET Framework 4.8.1.
Was this page helpful?
Was this page helpful?