{"id":20255,"date":"2018-11-28T16:21:07","date_gmt":"2018-11-29T00:21:07","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=20255"},"modified":"2019-02-22T15:57:15","modified_gmt":"2019-02-22T22:57:15","slug":"announcing-net-framework-4-8-early-access-build-3694","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-framework-4-8-early-access-build-3694\/","title":{"rendered":"Announcing .NET Framework 4.8 Early Access build 3694"},"content":{"rendered":"<p>We are happy to let you know that .NET Framework 4.8 is now <em><strong>feature complete<\/strong><\/em> and we have an early access build to share with you all! We will continue to stabilize this release and take more fixes over the coming months, and we would greatly appreciate it if you could help us ensure this is a high-quality release by trying it out and providing feedback on the new features via <a href=\"https:\/\/github.com\/Microsoft\/dotnet-framework-early-access\/issues\/new\">.NET Framework Early Access GitHub repository<\/a>.<\/p>\n<p>This build includes an updated .NET 4.8 runtime as well as the .NET 4.8 Developer Pack (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 note: this build is not supported for production use.<\/p>\n<p><strong>Next steps:\n<\/strong>To explore the new features, download the <span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2033281\">.NET 4.8 Developer Pack build 3694<\/a><\/span>. Instead, if you want to try just the .NET 4.8 runtime, you can download either of these:<\/p>\n<ul>\n<li><span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2032182\">.NET 4.8 Web Installer<\/a><\/span> \u2013 requires an internet connection during installation<\/li>\n<li><span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2032091\">.NET 4.8 Offline installer<\/a><\/span> \u2013 can be downloaded and installed later in a disconnected state<\/li>\n<\/ul>\n<p>This preview build 3694 includes <span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2035215&amp;clcid=0x409\">improvements\/fixes<\/a><\/span> in the following areas:<b><\/b><\/p>\n<ul>\n<li><b><strong>[BCL] \u2013 <\/strong><\/b>Reducing FIPS Impact on Cryptography<\/li>\n<\/ul>\n<ul>\n<li><strong> [CLR] \u2013 <\/strong>Antimalware scanning for all assemblies<\/li>\n<\/ul>\n<ul>\n<li><strong>[WCF] \u2013 <\/strong>ServiceHealthBehavior<\/li>\n<\/ul>\n<ul>\n<li><strong>[WPF] \u2013 <\/strong>Support for UIAutomation ControllerFor property<\/li>\n<\/ul>\n<ul>\n<li><strong>[WPF] \u2013 <\/strong>Tooltips on keyboard access<\/li>\n<\/ul>\n<ul>\n<li><b><strong>[WPF] \u2013 <\/strong><\/b>Added Support for SizeOfSet and PositionInSet UIAutomation properties<\/li>\n<\/ul>\n<p>You can see the complete list of improvements in this build <span><a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2035320&amp;clcid=0x409\">here<\/a><\/span>.<\/p>\n<p>.NET Framework build 3694 is also included in the next update for Windows 10. You can sign up for\u00a0<span><a href=\"https:\/\/insider.windows.com\/en-us\/\">Windows Insiders<\/a><\/span>\u00a0to validate that your applications work great on the latest .NET Framework included in the latest Windows 10 releases.<\/p>\n<h2>BCL \u2013 Reducing FIPS Impact on Cryptography<\/h2>\n<p>.NET Framework 2.0+ have cryptographic provider classes such as SHA256Managed, which throw a CryptographicException when the system cryptographic libraries are configured in \u201cFIPS mode\u201d. These exceptions are thrown because the managed versions have not undergone FIPS (Federal Information Processing Standards) 140-2 certification (JIT and NGEN image generation would both invalidate the certificate), unlike the system cryptographic libraries. Few developers have their development machines in \u201cFIPS mode\u201d, which results in these exceptions being raised in production (or on customer systems). The \u201cFIPS mode\u201d setting was also used by .NET Framework to block cryptographic algorithms which were not considered an approved algorithm by the FIPS rules.<\/p>\n<p>For applications built for .NET Framework 4.8, these exceptions will no longer be thrown (by default). Instead, the SHA256Managed class (and the other managed cryptography classes) will redirect the cryptographic operations to a system cryptography library. This policy change effectively removes a potentially confusing difference between developer environments and the production environments in which the code runs and makes native components and managed components operate under the same cryptographic policy.<\/p>\n<p>Applications targeting .NET Framework 4.8 will automatically switch to the newer, relaxed policy and will no longer see exceptions being thrown from MD5Cng, MD5CryptoServiceProvider, RC2CryptoServiceProvider, RIPEMD160Managed, and RijndaelManaged when in \u201cFIPS mode\u201d. Applications which depend on the exceptions from previous versions can return to the previous behavior by setting the AppContext switch \u201cSwitch.System.Security.Cryptography.UseLegacyFipsThrow\u201d to \u201ctrue\u201d.<\/p>\n<h2>Runtime \u2013 Antimalware Scanning for All Assemblies<\/h2>\n<p>In previous versions of .NET Framework, Windows Defender or third-party antimalware software would automatically scan all assemblies loaded from disk for malware. However, assemblies loaded from elsewhere, such as by using Assembly.Load(byte[]), would not be scanned and could potentially carry viruses undetected.<\/p>\n<p>.NET Framework 4.8 on Windows 10 triggers scans for those assemblies by Windows Defender and many other antimalware solutions that implement the <u><a href=\"https:\/\/cloudblogs.microsoft.com\/microsoftsecure\/2015\/06\/09\/windows-10-to-offer-application-developers-new-malware-defenses\/\">Antimalware Scan Interface<\/a><\/u>. We expect that this will make it harder for malware to disguise itself in .NET programs.<\/p>\n<h2>WCF &#8211; ServiceHealthBehavior<\/h2>\n<p><span>Health endpoints have many benefits and are widely used by orchestration tools to manage the service based on the service health status. Health checks can also be used by monitoring tools to track and alert on the availability and performance of the service, where they serve as early problem indicators.<\/span><span>\u00a0<\/span><\/p>\n<p><span>ServiceHealthBehavior<\/span> <span>is a WCF service behavior that extends <\/span><span>IServiceBehavior<\/span><span>.\u00a0 When added to the <\/span><span>ServiceDescription.Behaviors<\/span><span> collection, it will enable the following:<\/span><span>\u00a0<\/span><\/p>\n<ul>\n<li><span> <\/span><span>Return service health status with HTTP response codes: One can specify in the query string the HTTP status code for a HTTP\/GET health probe request.<\/span><span><\/span><\/li>\n<li>Publication of service health: Service specific details including service state and throttle counts and capacity are displayed using an HTTP\/GET request using the \u201c?health\u201d query string. Knowing and easily having access to the information displayed is important when trouble-shooting a mis-behaving WCF service.<\/li>\n<\/ul>\n<h5>Config ServiceHealthBehavior:<\/h5>\n<p><span>There are two ways to expose the health endpoint and publish WCF service health information: by using code or by using a configuration file.<\/span><\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>Enable health endpoint using code<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><script src=\"https:\/\/gist.github.com\/NKarnam15\/b2187df09206e9a96078d9d2e299f362.js\"><\/script><\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>Enable health endpoint using config<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><script src=\"https:\/\/gist.github.com\/NKarnam15\/0840f9d894753166e7ef2ab79fea1522.js\"><\/script><\/p>\n<h5>Return service health status with HTTP response codes:<\/h5>\n<p><span>Health status can be queried by query parameters (OnServiceFailure, OnDispatcherFailure, OnListenerFailure, OnThrottlePercentExceeded). HTTP response code <\/span><span>(200 \u2013 599) <\/span><span>can be specified for each query parameter. <\/span><span>If the HTTP response code is omitted for a query parameter, a 503 HTTP response code is used by default. <\/span><\/p>\n<h5>Query parameters and examples:<\/h5>\n<p><span><\/span><span><strong>1. OnServiceFailure<\/strong><\/span><span>: <\/span><\/p>\n<ul>\n<li><span>Example: by querying <\/span><span>https:\/\/contoso:81\/Service1?health&amp;OnServiceFailure=450<\/span><span>, a 450 HTTP response status code is returned <\/span><span>when <\/span><span>ServiceHost.State<\/span><span> is greater than <\/span><span>CommunicationState.Opened.<\/span><\/li>\n<\/ul>\n<p><span>2. <\/span><span><strong>OnDispatcherFailure<\/strong><\/span><span>: <\/span><\/p>\n<ul>\n<li><span>Example: by querying <\/span><span>https:\/\/contoso:81\/Service1?health&amp;OnDispatcherFailure=45<\/span><span><u>5<\/u><\/span><span>, a 455 HTTP response status code is returned <\/span><span>when the state of any of the channel dispatchers is greater than <\/span><span>CommunicationState.Opened.<\/span><\/li>\n<\/ul>\n<p><span>3. <\/span><span><strong>OnListenerFailure<\/strong><\/span><span>: <\/span><\/p>\n<ul>\n<li><span>Example: by querying <\/span><span>https:\/\/contoso:81\/Service1?health&amp;OnListenerFailure=4<\/span><span><u>65<\/u><\/span><span>, a 465 HTTP response status code is returned<\/span><span> when the state of any of the channel listeners is greater than <\/span><span>CommunicationState.Opened<\/span><span>.<\/span><span>\u00a0<\/span><\/li>\n<\/ul>\n<p><span>4. <\/span><span><strong>OnThrottlePercentExceeded<\/strong><\/span><span>: Specifies the percentage {1 \u2013 100} that triggers the response and its HTTP response code {200 &#8211; 599}.<\/span><\/p>\n<ul>\n<li><span>Example: by querying <\/span><span>https:\/\/contoso:81\/Service1?health&amp;OnThrottlePercentExceeded=<\/span> <span>70:350,95:500<\/span><span>,<\/span> when the throttle percentage is equal or larger than 95%, 500 the HTTP response code is returned; when the percentage is equal or larger than 70% and less then 95%, \u00a0 350 is returned; otherwise, 200 is returned.<\/li>\n<\/ul>\n<h5>Publication of service health:<\/h5>\n<p>After enabling the health endpoint, <span>the service health status can be displayed either in html (<\/span>by specifying the query string: <span>https:\/\/contoso:81\/Service1?health<\/span><span>) or xml (<\/span>by specifying the query string: <span>https:\/\/contoso:81\/Service1?health&amp;Xml<\/span><span>) formats. <\/span><span>https:\/\/contoso:81\/Service1?health&amp;NoContent<\/span> <span>returns empty html page.<\/span><\/p>\n<h5>Note:<\/h5>\n<p><span>It\u2019s best practice to always limit access to the service health endpoint. You can restrict access by using the following mechanisms:<\/span><\/p>\n<ol>\n<li><span> <\/span><span>Use a different port for the health endpoint than what\u2019s used for the other services as well as use a firewall rule to control access.<\/span><\/li>\n<li><span> <\/span><span>Add the desirable authentication and authorization to the health endpoint binding.<\/span><\/li>\n<\/ol>\n<h2>WPF &#8211; Support for UIAutomation ControllerFor property.<\/h2>\n<p>UIAutomation\u2019s ControllerFor property returns an array of automation elements that are manipulated by the automation element that supports this property. This property is commonly used for Auto-suggest accessibility. ControllerFor is used when an automation element affects one or more segments of the application UI or the desktop. Otherwise, it is hard to associate the impact of the control operation with UI elements. This feature adds the ability for controls to provide a value for ControllerFor property.<\/p>\n<p>A new virtual method has been added to AutomationPeer:\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/4798d7f65753cce1d0eb0855b639eaaa.js\"><\/script><\/p>\n<p>To provide a value for the ControllerFor property, simply override this method and return a list of AutomationPeers for the controls being manipulated by this AutomationPeer:\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/d79933dcbe5d1af1bf034664970b8274.js\"><\/script><\/p>\n<h2>WPF \u2013 Tooltips on keyboard access<\/h2>\n<p>Currently tooltips only display when a user hovers the mouse cursor over a control. In .NET Framework 4.8, WPF is adding a feature that enables tooltips to show on keyboard focus, as well as via a keyboard shortcut.<\/p>\n<p>To enable this feature, an application needs to target .NET Framework 4.8 or opt-in via AppContext switch \u201cSwitch.UseLegacyAccessibilityFeatures.3\u201d and \u201cSwitch.UseLegacyToolTipDisplay\u201d.<\/p>\n<p><strong>Sample App.config file:\u00a0<\/strong>\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/8cdca1d27857b54383148a5ec1b937bd.js\"><\/script><\/p>\n<p>Once enabled, all controls containing a tooltip will start to display it once the control receives keyboard focus. The tooltip can be dismissed over time or when keyboard focus changes. Users can also dismiss the tooltip manually via a new keyboard shortcut Ctrl + Shift + F10. Once the tooltip has been dismissed it can be displayed again via the same keyboard shortcut.<\/p>\n<p>Note: RibbonToolTips on Ribbon controls won\u2019t show on keyboard focus &#8211; they will only show via the keyboard shortcut.<\/p>\n<h2>WPF \u2013 Added Support for SizeOfSet and PositionInSet UIAutomation properties<\/h2>\n<p>Windows 10 introduced new UIAutomation properties SizeOfSet and PositionInSet which are used by applications to describe the count of items in a set. UIAutomation client applications such as screen readers can then query an application for these properties and announce an accurate representation of the application\u2019s UI.<\/p>\n<p>This feature adds support for WPF applications to expose these two properties to UIAutomation. This can be accomplished in two ways:<\/p>\n<ol>\n<li><strong>DependencyProperties\u00a0<\/strong><\/li>\n<\/ol>\n<p>New DependencyProperties SizeOfSet and PositionInSet have been added to the System.Windows.Automation.AutomationProperties namespace. A developer can set their values via XAML:\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/9dac32e7eab213ac48ea2305c819fe68.js\"><\/script><\/p>\n<ol start=\"2\">\n<li><strong>AutomationPeer virtual methods\u00a0<\/strong><\/li>\n<\/ol>\n<p>Virtual methods GetSizeOfSetCore and GetPositionInSetCore have also been added to the AutomationPeer class. A developer can provide values for SizeOfSet and PositionInSet by overriding these methods:\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/4ffae7683eadce15944f39f4d5a1c90e.js\"><\/script><\/p>\n<p><strong>Automatic values\u00a0<\/strong><\/p>\n<p>Items in ItemsControls will provide a value for these properties automatically without additional action from the developer. If an ItemsControl is grouped, the collection of groups will be represented as a set and each group counted as a separate set, with each item inside that group providing it\u2019s position inside that group as well as the size of the group. Automatic values are not affected by virtualization. Even if an item is not realized, it is still counted towards the total size of the set and affects the position in the set of it\u2019s sibling items.<\/p>\n<p>Automatic values are only provided if the developer is targeting .NET Framework 4.8 or has set the AppContext switch \u201cSwitch.UseLegacyAccessibilityFeatures.3\u201d &#8211; for example via App.config file:\n<script src=\"https:\/\/gist.github.com\/NKarnam15\/5810331fddcbbc139fdd32b4c280bcc3.js\"><\/script><\/p>\n<h2>Previous .NET Framework Early Access Build<\/h2>\n<ul>\n<li><span><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2018\/10\/30\/announcing-net-framework-4-8-early-access-build-3673\/\">.NET Framework 4.8 Early Access build 3673<\/a><\/span><\/li>\n<\/ul>\n<h2>Closing<\/h2>\n<p>Thanks for your continued support of the Early Access Program. We will do our best to ensure these builds are stable and compatible but if you see bugs or issues please take the time to report these to us on\u00a0<span><a href=\"https:\/\/github.com\/Microsoft\/dotnet-framework-early-access\/issues\/new\">Github<\/a><\/span>\u00a0so we can address these issues before the official release.<\/p>\n<p>Thank you!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are happy to let you know that .NET Framework 4.8 is now feature complete and we have an early access build to share with you all! We will continue to stabilize this release and take more fixes over the coming months, and we would greatly appreciate it if you could help us ensure this [&hellip;]<\/p>\n","protected":false},"author":967,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,195],"tags":[11,30,36,47,108,117],"class_list":["post-20255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-dotnet-framework","tag-net-framework","tag-announcement","tag-async","tag-clr","tag-performance","tag-releases"],"acf":[],"blog_post_summary":"<p>We are happy to let you know that .NET Framework 4.8 is now feature complete and we have an early access build to share with you all! We will continue to stabilize this release and take more fixes over the coming months, and we would greatly appreciate it if you could help us ensure this [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/967"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=20255"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/20255\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=20255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=20255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=20255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}