Announcing .NET Framework 4.8 Early Access build 3646
Today, we are happy to share an Early Access build for the .NET Framework 4.8. This includes an updated .NET 4.8 runtime as well as the .NET 4.8 Developer Pack (a a single package that bundles the .NET Framework 4.8 runtime, the .NET 4.8 Targeting Pack, and the .NET Framework 4.8 SDK).
Please help us ensure this is a high quality and compatible release by trying out this build and exploring the new features.
To explore the new features, download the .NET 4.8 Developer Pack build 3646. Instead, if you want to try just the .NET 4.8 runtime, you can download either of these:
- .NET 4.8 Web Installer – requires an internet connection during installation
- .NET 4.8 Offline installer – can be downloaded and installed later in a disconnected state
Please provide your feedback by reporting an issue at the .NET Framework Early Access GitHub repository.
Note: this release is still under development, you can expect to see more features and fixes in future preview builds. Also, a reminder that this build is not supported for production use.
This preview build 3646 includes improvements/fixes in the following areas:
- [Runtime] JIT and NGEN improvements
- [Windows Forms] Accessibility enhancements
- [WPF] SelectionTextBrush Property
- [BCL] Updated ZLib
You can see the complete list of improvements in this build here.
.NET Framework build 3646 is also included in the next update for Windows 10. You can sign up for Windows Insiders to validate that your applications work great on the latest .NET Framework included in the latest Windows 10 releases.
Runtime – JIT improvements
The JIT in .NET 4.8 is based on .NET Core 2.1. All bug fixes and many code generation-based performance optimizations from .NET Core 2.1 are now available in the .NET Framework.
Runtime – NGEN improvements
NGEN images in the .NET Framework no longer contain writable & executable sections. This reduces the surface area available to attacks that attempt to execute arbitrary code by modifying memory that will be executed.
While there will still be writable & executable data in memory at runtime, this change removes those mapped from NGEN images, allowing them to run in restricted environments that don’t permit executable/writable sections in images.
Windows Forms – Accessibility Enhancements
In .NET Framework 4.8 WinForms is adding three new features to enable developers to write more accessible applications. The features added are intended to make communication of application data to visually impaired users more robust. We’ve added support for ToolTips when a user navigates via the keyboard, we’ve added LiveRegions and Notification Events to many commonly used controls.
To enable these features your application needs to have the following AppContextSwitches enabled in the App.config file:
UIA LiveRegions Support in Labels and StatusStrips
UIA Live Regions allow application developers to notify screen readers of a text change on a control that is located apart from the location where the user is working. Examples of where this would come in handy could be a StatusStrip that shows a connection status. If the connection is dropped and the Status changes, the developer might want to notify the screen reader of this change. Windows Forms has implemented UIA LiveRegions for both the Label control and the StatusStrip control.
Example use of the LiveRegion in a Label Control:
Narrator will now announce “Ready” Regardless of where the user is interacting with the application.
You can also implement your UserControl as a Live region:
UIA Notification Events
In Windows 10 Fall Creators Update Windows introduced a new method of having an application notify Narrator that content has changed, and Narrator should announce the change. The UIA Notification event provides a way for your app to raise a UIA event which leads to Narrator simply making an announcement based on text you supply with the event, without the need to have a corresponding control in the UI. In some scenarios, this could be a straightforward way to dramatically improve the accessibility of your app. For more information about UIA Notification Events, see this blog post.
An example of where a Notification might come in handy is to notify the progress of some process that may take some time.
An example of raising the Notification event:
ToolTips on keyboard access
Currently a control tooltip can only be triggered to pop up by moving a mouse pointer into the control. This new feature enables a keyboard user to trigger a control’s tooltip by focusing the control using a Tab key or arrow keys with or without modifier keys. This particular accessibility enhancement requires an additional AppContextSwitch as seen in the following example:
- Create a new WinForms application
- Add the following XML to the App.config file
3. Add several buttons and a ToolTip control to the application’s form.
4. Set tooltips for the buttons.
5. Run the application and navigate between the buttons using a keyboard:
DataGridView control accessible hierarchy changes
Currently the accessible hierarchy (UI Automation tree) shows the editing box tree element as a child of currently edited cell but not as a root child element of DataGridView. The hierarchy tree update can be observed using Inspect tool:
WPF – SelectionTextBrush Property for use with Non-Adorner Based Text Selection
In the .NET Framework 4.7.2 WPF added the ability to draw TextBox and PasswordBox text selection without using the adorner layer (See Here). The foreground color of the selected text in this scenario was dictated by SystemColors.HighlightTextBrush.
In the .NET Framework 4.8 we are adding a new property, SelectionTextBrush, that allows developers to select the specific brush for the selected text when using non-adorner based text selection.
This property works only on TextBoxBase derived controls and PasswordBox in WPF applications with non-adorner based text selection enabled. It does not work on RichTextBox. If non-adorner based text selection is not enabled, this property is ignored.
To use this property, simply add it to your XAML code and use the appropriate brush or binding.
The resulting text selection will look like this:
You can combine the use of SelectionBrush and SelectionTextBrush to generate any color combination of background and foreground that you deem appropriate.
BCL – Updated ZLib
Starting with .NET Framework 4.5 we used the native version of ZLib (a native external compression library used for data compression) from http://zlib.net in clrcompression.dll in order to provide an implementation for the deflate algorithm. In .NET Framework 4.8 we updated clrcompression.dll to use version 1.2.11 which includes several key improvements and fixes.
Try out these new features in .NET Framework 4.8 early access build 3646 and share your feedback by reporting an issue at the .NET Framework Early Access GitHub repository.