{"id":22762,"date":"2019-04-18T15:13:01","date_gmt":"2019-04-18T22:13:01","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=22762"},"modified":"2019-04-19T16:08:04","modified_gmt":"2019-04-19T23:08:04","slug":"announcing-net-core-3-preview-4","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-4\/","title":{"rendered":"Announcing .NET Core 3 Preview 4"},"content":{"rendered":"<p>Today, we are announcing .NET Core 3.0 Preview 4. It includes a chart control for Windows Forms, HTTP\/2 support, GC updates to use less memory, support for CPU limits with Docker, the addition of PowerShell in .NET Core SDK Docker container images, and other improvements. If you missed it, check out the improvements we released in <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-3\/\" rel=\"nofollow\">.NET Core 3.0 Preview 3<\/a> just last month.<\/p>\n<p><a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet-core\/3.0\" rel=\"nofollow\">Download .NET Core 3 Preview 4<\/a> right now on Windows, macOS and Linux.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/asp-net-core-updates-in-net-core-3-0-preview-4\">ASP.NET Core<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-entity-framework-core-3-0-preview-4\">Entity Framework Core<\/a>\u00a0updates are also being released today.<\/p>\n<div>The <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">preview version of Visual Studio 2019 Update 1<\/a>\u00a0is highly recommended for .NET Core 3.0 Previews. You can enable .NET Core 3.0 Preview in Visual Studio 2019 (v16.0) by checking `Tools -&gt; Options -&gt; Projects and Solutions -&gt; .NET Core -&gt; Use Previews of the .NET Core SDK.`. Some features of .NET Core 3.0 Previews will not work correctly in Visual Studio 2019 (v16.0).<\/div>\n<div><\/div>\n<h2><a id=\"user-content-winforms-chart-control-now-available-for-net-core\" class=\"anchor\" href=\"#winforms-chart-control-now-available-for-net-core\" aria-hidden=\"true\"><\/a>WinForms Chart control now available for .NET Core<\/h2>\n<p>We&#8217;ve been hearing that some developers were not able to migrate their existing .NET Framework applications to .NET Core because they had a dependency on the <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.windows.forms.datavisualization.charting.chart?view=netframework-4.7.2\" rel=\"nofollow\">Chart control<\/a>. We&#8217;ve fixed that for you!<\/p>\n<p>The <a href=\"https:\/\/www.nuget.org\/packages\/System.Windows.Forms.DataVisualization\/\" rel=\"nofollow\">System.Windows.Forms.DataVisualization<\/a> package (which includes the chart control) is now available on NuGet, for .NET Core. You can now include this control in your .NET Core WinForms applications!<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22764 size-large\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-1024x538.jpg\" alt=\"Chart control in Visual Studio\" width=\"640\" height=\"336\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-1024x538.jpg 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-300x158.jpg 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-768x404.jpg 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart.jpg 1219w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>We ported the <code>System.Windows.Forms.DataVisualization<\/code> library to .NET Core over the last few sprints. The source for the chart control is available at <a href=\"https:\/\/github.com\/dotnet\/winforms-datavisualization\">dotnet\/winforms-datavisualization<\/a>, on GitHub. The control was migrated to ease porting to .NET Core 3, but isn&#8217;t a component we intend to innovate in. For more advanced data visualization scenarios check out <a href=\"https:\/\/powerbi.microsoft.com\/\" rel=\"nofollow\">Power BI<\/a>.<\/p>\n<p>The best way to familiarize yourself with the Charting control is to take a look at our <a href=\"https:\/\/github.com\/dotnet\/winforms-datavisualization\/tree\/master\/sample\/ChartSamples\">ChartSamples project<\/a>. It contains all existing chart types and can guide you through every step.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-22765 size-large\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-sample-app-1024x738.gif\" alt=\"Chart samples app\" width=\"640\" height=\"461\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-sample-app-1024x738.gif 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-sample-app-300x216.gif 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/chart-sample-app-768x554.gif 768w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4><a id=\"user-content-enabling-the-chart-control-in-your-net-project\" class=\"anchor\" href=\"#enabling-the-chart-control-in-your-net-project\" aria-hidden=\"true\"><\/a>Enabling the Chart control in your .NET project<\/h4>\n<p>To use the Chart control in your WinForms Core project add a reference to the <a href=\"https:\/\/www.nuget.org\/packages\/System.Windows.Forms.DataVisualization\/\" rel=\"nofollow\">System.Windows.Forms.DataVisualization NuGet package<\/a>. You can do it by either searching for <code>System.Windows.Forms.DataVisualization<\/code> in the NuGet Package Manager (don&#8217;t forget to check <strong>Include prerelease<\/strong> box) or by adding the following lines in your <code>.csproj<\/code> file.<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;ItemGroup&gt;\r\n    &lt;PackageReference Include=\"System.Windows.Forms.DataVisualization\" Version=\"1.0.0-prerelease.19212.2\"\/&gt;\r\n&lt;\/ItemGroup&gt;<\/pre>\n<p>Note: The WinForms designer is currently under development and you won&#8217;t be able to configure the control from the designer just yet. For now you can either use a code-first approach or you can create and configure the control in a .NET Framework application using the designer and then port your project to .NET Core. Porting guidelines are available in the <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/how-to-port-desktop-applications-to-net-core-3-0\/\" rel=\"nofollow\"><strong>How to port desktop applications to .NET Core 3.0<\/strong><\/a> post.<\/p>\n<h2><a id=\"user-content-wpf\" class=\"anchor\" href=\"#wpf\" aria-hidden=\"true\"><\/a>WPF<\/h2>\n<p>The WPF team <a href=\"https:\/\/github.com\/dotnet\/wpf\/pull\/504\">published more components<\/a> to <a href=\"https:\/\/github.com\/dotnet\/wpf\">dotnet\/wpf<\/a> between the Preview 3 and Preview 4 releases.<\/p>\n<p>The following components are now available as source:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/wpf\/tree\/master\/packaging\/Microsoft.NET.Sdk.WindowsDesktop\">Microsoft.NET.Sdk.WindowsDesktop<\/a> &#8212; this is the MSBuild SDK (as in &#8220;SDK style project&#8221; SDK) for Windows Desktop apps.<\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/wpf\/tree\/master\/packaging\/Microsoft.Dotnet.Wpf.ProjectTemplates\">Microsoft.Dotnet.Wpf.ProjectTemplates<\/a> &#8212; these are the project templates for WPF.<\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/wpf\/tree\/master\/src\/Microsoft.DotNet.Wpf\/src\/PresentationBuildTasks\">PresentationBuildTasks<\/a> &#8212; these are the tasks that are used to compile Xaml.<\/li>\n<\/ul>\n<p>The team published an <a href=\"https:\/\/github.com\/dotnet\/wpf\/issues\/607\">engineering write-up<\/a> on what they&#8217;ve been working on. You can expect them to publish more code to GitHub soon.<\/p>\n<h2><a id=\"user-content-improving-net-core-version-apis\" class=\"anchor\" href=\"#improving-net-core-version-apis\" aria-hidden=\"true\"><\/a>Improving .NET Core Version APIs<\/h2>\n<p>We have <a href=\"https:\/\/github.com\/dotnet\/coreclr\/issues\/22844\">improved the .NET Core version APIs<\/a> in .NET Core 3.0. They now return the version information you would expect. These changes while they are objectively better are technically breaking and may break applications that rely on version APIs for various information.<\/p>\n<p>You can now get access to the following information via existing APIs:<\/p>\n<div class=\"highlight highlight-text-shell-session\">\n<pre class=\"lang:default decode:true\">C:\\testapps\\versioninfo&gt;dotnet run\r\n.NET Core version:\r\nEnvironment.Version: 3.0.0\r\nRuntimeInformation.FrameworkDescription: .NET Core 3.0.0-preview4.19113.15\r\nCoreFX Build: 3.0.0-preview4.19113.15\r\nCoreFX Hash: add4cacbfb7f7d3f5f07630d10b24e38da4ad027<\/pre>\n<\/div>\n<p>The <a href=\"https:\/\/github.com\/richlander\/testapps\/blob\/master\/versioninfo\/Program.cs\">code to produce that output<\/a> follows:<\/p>\n<div class=\"highlight highlight-source-cs\">\n<pre class=\"lang:default decode:true\">WriteLine(\".NET Core version:\");\r\nWriteLine($\"Environment.Version: {Environment.Version}\");\r\nWriteLine($\"RuntimeInformation.FrameworkDescription: {RuntimeInformation.FrameworkDescription}\");\r\nWriteLine($\"CoreCLR Build: {((AssemblyInformationalVersionAttribute[])typeof(object).Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute),false))[0].InformationalVersion.Split('+')[0]}\");\r\nWriteLine($\"CoreCLR Hash: {((AssemblyInformationalVersionAttribute[])typeof(object).Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false))[0].InformationalVersion.Split('+')[1]}\");\r\nWriteLine($\"CoreFX Build: {((AssemblyInformationalVersionAttribute[])typeof(Uri).Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute),false))[0].InformationalVersion.Split('+')[0]}\");\r\nWriteLine($\"CoreFX Hash: {((AssemblyInformationalVersionAttribute[])typeof(Uri).Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false))[0].InformationalVersion.Split('+')[1]}\");<\/pre>\n<\/div>\n<h2><a id=\"user-content-tiered-compilation-tc-update\" class=\"anchor\" href=\"#tiered-compilation-tc-update\" aria-hidden=\"true\"><\/a>Tiered Compilation (TC) Update<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/tiered-compilation-preview-in-net-core-2-1\/\" rel=\"nofollow\">Tiered compilation (TC)<\/a> is a runtime feature that is able to control the compilation speed and quality of the JIT to achieve various performance outcomes. It is enabled by default in .NET Core 3.0 builds.<\/p>\n<p>The fundamental benefit and capability of TC is to enable (re-)jitting methods with slower but faster to produce or higher quality but slower to produce code in order to increase performance of an application as it goes through various stages of execution, from startup through steady-state. This contrasts with the non-TC approach, where every method is compiled a single way (the same as the high-quality tier), which is biased to steady-state over startup performance.<\/p>\n<p>We are considering what the <a href=\"https:\/\/github.com\/dotnet\/coreclr\/issues\/24064\">default TC configuration should be for the final 3.0 release<\/a>. We have been investigating the performance impact (positive and\/or negative) for a variety of application scenarios, with the goal of selecting a default that is good for all scenarios, and providing configuration switches to enable developers to opt apps into other configurations.<\/p>\n<p>TC remains enabled in Preview 4, but we changed the functionality that is enabled by default. We are looking for feedback and additional data to help us decide if this new configuration is best, or if we need to make more changes. Our goal is to select the best overall default, and then provide one or more configuration switches to enable other opt-in behaviors.<\/p>\n<p>There are two tiers, tier 0 and tier 1. At startup, tier 0 code can be one of the following:<\/p>\n<ul>\n<li>Ahead-of-time compiled <a href=\"https:\/\/github.com\/dotnet\/coreclr\/blob\/master\/Documentation\/botr\/readytorun-overview.md\">Ready to Run (R2R)<\/a> code.<\/li>\n<li>Tier 0 jitted code, produced by &#8220;Quick JIT&#8221;. Quick JIT applies fewer optimizations (similar to &#8220;minopts&#8221;) to compile code faster.<\/li>\n<\/ul>\n<p>Both of these types of tier 0 code can be &#8220;upgraded&#8221; to tier 1 code, which is fully-optimized jitted code.<\/p>\n<p>In preview 4, R2R tiering is enabled by default and tier 0 jitted code (or Quick JIT) is disabled. This means that all jitted code is jitted as tier 1, by default. Tier 1 code is higher quality (executes faster), but takes longer to generate, so can increase startup time. For Preview 3, TC, including Quick JIT, were enabled.<\/p>\n<p>To enable Quick JIT (tier 0 jitted code):<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre class=\"lang:default decode:true\">&lt;TieredCompilationQuickJit&gt;true&lt;\/TieredCompilationQuickJit&gt;<\/pre>\n<\/div>\n<p>To disable TC completely:<\/p>\n<div class=\"highlight highlight-text-xml\">\n<pre class=\"lang:default decode:true\">&lt;TieredCompilation&gt;false&lt;\/TieredCompilation&gt;<\/pre>\n<\/div>\n<p>Please try out the various compilation modes, including the Preview 4 default, and give us feedback.<\/p>\n<h2><a id=\"user-content-http2-support\" class=\"anchor\" href=\"#http2-support\" aria-hidden=\"true\"><\/a>HTTP\/2 Support<\/h2>\n<p>We now have support for <a href=\"https:\/\/en.wikipedia.org\/wiki\/HTTP\/2\" rel=\"nofollow\">HTTP\/2<\/a> in HttpClient. The new protocol is a requirement for some APIs, like <a href=\"https:\/\/github.com\/grpc\/\">gRPC<\/a> and <a href=\"https:\/\/developer.apple.com\/library\/archive\/documentation\/NetworkingInternet\/Conceptual\/RemoteNotificationsPG\/APNSOverview.html#\/\/apple_ref\/doc\/uid\/TP40008194-CH8-SW1\" rel=\"nofollow\">Apple Push Notification Service<\/a>. We expect more services to require HTTP\/2 in the future.<\/p>\n<p>ASP.NET also has support for HTTP\/2, however it is an independent implementation that is optimized for scale.<\/p>\n<p>In Preview 4, HTTP\/2 is not enabled by default, but can be enabled with one of the following methods:<\/p>\n<ul>\n<li>Set <code>AppContext.SetSwitch(\"System.Net.Http.SocketsHttpHandler.Http2Support\", true);<\/code> app context setting<\/li>\n<li>Set <code>DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP2SUPPORT<\/code> environment variable to <code>true<\/code><\/li>\n<\/ul>\n<p>These configurations (either one) need to be set before using HttpClient if you intend to use HTTP\/2.<\/p>\n<p>Note: the preferred HTTP protocol version will be negotiated via TLS\/ALPN and HTTP\/2 will only be used if the server selects to use it.<\/p>\n<h2><a id=\"user-content-sdk-docker-images-contain-powershell-core\" class=\"anchor\" href=\"#sdk-docker-images-contain-powershell-core\" aria-hidden=\"true\"><\/a>SDK Docker Images Contain PowerShell Core<\/h2>\n<p><a href=\"https:\/\/github.com\/powershell\/powershell\">PowerShell Core<\/a> has been <a href=\"https:\/\/github.com\/dotnet\/dotnet-docker\/issues\/1069\">added to the .NET Core SDK Docker container images<\/a>, per <a href=\"https:\/\/github.com\/dotnet\/dotnet-docker\/issues\/360\">requests from the community<\/a>. PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool\/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language and a framework for processing cmdlets.<\/p>\n<p>You can try out PowerShell Core, as part of the .NET Core SDK container image, by running the following Docker command:<\/p>\n<div class=\"highlight highlight-text-shell-session\">\n<pre class=\"lang:default decode:true\">docker run --rm mcr.microsoft.com\/dotnet\/core\/sdk:3.0 pwsh -c Write-Host \"Hello Powershell\"<\/pre>\n<\/div>\n<p>There are two main scenarios that having PowerShell inside the .NET Core SDK container image enables, which were not otherwise possible:<\/p>\n<ul>\n<li>Write .NET Core application <a href=\"https:\/\/github.com\/dotnet\/dotnet-docker\/blob\/master\/3.0\/sdk\/nanoserver-1809\/amd64\/Dockerfile\">Dockerfiles with PowerShell syntax<\/a> for any OS.<\/li>\n<li>Write .NET Core application\/library build logic that can be easily containerized.<\/li>\n<\/ul>\n<p>Example syntax for launching PowerShell for a (volume-mounted) containerized build:<\/p>\n<ul>\n<li><code>docker run -it -v c:\\myrepo:\/myrepo -w \/myrepo mcr.microsoft.com\/dotnet\/core\/sdk:3.0 pwsh build.ps1<\/code><\/li>\n<li><code>docker run -it -v c:\\myrepo:\/myrepo -w \/myrepo mcr.microsoft.com\/dotnet\/core\/sdk:3.0 .\/build.ps1<\/code><\/li>\n<\/ul>\n<p>For the second example to work, on Linux, the <code>.ps1<\/code> file needs to have the following pattern, and needs to be formatted with Unix (LF) not Windows (CRLF) line endings:<\/p>\n<div class=\"highlight highlight-source-powershell\">\n<pre class=\"lang:default decode:true\">#!\/usr\/bin\/env pwsh\r\nWrite-Host \"test\"<\/pre>\n<\/div>\n<p>If you are new to PowerShell and would like to learn more, we recommend reviewing the <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\/tree\/master\/docs\/learning-powershell\">getting started<\/a> documentation.<\/p>\n<p>Note: PowerShell Core is now available as part of <a href=\"https:\/\/hub.docker.com\/_\/microsoft-dotnet-core-sdk\/\" rel=\"nofollow\">.NET Core 3.0 SDK container images<\/a>. It is not part of the <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet-core\/3.0\" rel=\"nofollow\">.NET Core 3.0 SDK<\/a>.<\/p>\n<h2><a id=\"user-content-better-support-docker-cpu---cpus-limits\" class=\"anchor\" href=\"#better-support-docker-cpu---cpus-limits\" aria-hidden=\"true\"><\/a>Better support Docker CPU (&#8211;cpus) Limits<\/h2>\n<p>The Docker client allows limiting memory and CPU. We improved support for <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-3\/\" rel=\"nofollow\">memory limits<\/a> in Preview 3, and have now started <a href=\"https:\/\/github.com\/dotnet\/coreclr\/commit\/aea3b1a80d6c114e3e67bc9521bf39a8a17371d1\">improving CPU limits support<\/a>.<\/p>\n<h3><a id=\"user-content-round-up-the-value-of-the-cpu-limit\" class=\"anchor\" href=\"#round-up-the-value-of-the-cpu-limit\" aria-hidden=\"true\"><\/a>Round up the value of the CPU limit<\/h3>\n<p>In the case where <code>--cpus<\/code> is set to a value close (enough) to a smaller integer (for example, 1.499999999), the runtime would previously round that value down (in this case, to 1). As a result, the runtime would take advantage of less CPU than requested, leading to CPU underutilization.<\/p>\n<p>By rounding up the value, the runtime augments the pressure on the OS threads scheduler, but even in the worst case scenario (<code>--cpus=1.000000001<\/code> &#8212; previously rounded down to 1, now rounded to 2), we have not observed any overutilization of the CPU leading to performance degradation.<\/p>\n<h3><a id=\"user-content-thread-pool-honors-cpu-limits\" class=\"anchor\" href=\"#thread-pool-honors-cpu-limits\" aria-hidden=\"true\"><\/a>Thread pool honors CPU limits<\/h3>\n<p>The next step is ensuring that the thread pool honors CPU limits. Part of the algorithm of the thread pool is computing CPU busy time, which is, in part, a function of available CPUs. By taking CPU limits into account when computing CPU busy time, we avoid various heuristic of the threadpool competing with each other: one trying to allocate more threads to increase the CPU busy time, and the other one trying to allocate less threads because adding more threads doesn&#8217;t improve the throughput.<\/p>\n<h2><a id=\"user-content-making-gc-heap-sizes-smaller-by-default\" class=\"anchor\" href=\"#making-gc-heap-sizes-smaller-by-default\" aria-hidden=\"true\"><\/a>Making GC Heap Sizes Smaller by default<\/h2>\n<p>While working on <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-3\/\" rel=\"nofollow\">improving support for docker memory limits<\/a> as part of Preview 3, we were inspired to make more general GC policy updates to improve memory usage for a broader set of applications (even when not running in a container). The changes better align the generation 0 allocation budget with modern processor cache sizes and cache hierarchy.<\/p>\n<p><a href=\"https:\/\/twitter.com\/DamianEdwards\" rel=\"nofollow\">Damian Edwards<\/a> on our team noticed that the <a href=\"https:\/\/twitter.com\/DamianEdwards\/status\/1093981272362254336\" rel=\"nofollow\">memory usage of the ASP.NET benchmarks were cut in half<\/a> with no negative effect on other performance metrics. That&#8217;s a staggering improvement! As he says, these are the new defaults, with no change required to his (or your) code (other than adopting .NET Core 3.0).<\/p>\n<p>The memory savings that we saw with the ASP.NET benchmarks may or may not be representative of what you&#8217;ll see with your application. We&#8217;d like to hear how these changes reduce memory usage for your application.<\/p>\n<h2><a id=\"user-content-better-support-for-many-proc-machines\" class=\"anchor\" href=\"#better-support-for-many-proc-machines\" aria-hidden=\"true\"><\/a>Better support for many proc machines<\/h2>\n<p>Based on .NET&#8217;s Windows heritage, the GC needed to implement the <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/ProcThread\/processor-groups\" rel=\"nofollow\">Windows concept of processor groups<\/a> to support machines with &gt; 64 processors. This implementation was made in .NET Framework, 5-10 years ago. With .NET Core, we made the choice initially for the Linux PAL to emulate that same concept, even though it doesn&#8217;t exist in Linux.<\/p>\n<p>We have since abandoned this concept in the GC and transitioned it exclusively to the Windows PAL. We also now expose a configuration switch, GCHeapAffinitizeRanges, to specify affinity masks on machines with &gt;64 processors. <a href=\"https:\/\/twitter.com\/maoni0\" rel=\"nofollow\">Maoni Stephens<\/a> wrote about this change in <a href=\"https:\/\/blogs.msdn.microsoft.com\/maoni\/2019\/04\/03\/making-cpu-configuration-better-for-gc-on-machines-with-64-cpus\/\" rel=\"nofollow\">Making CPU configuration better for GC on machines with &gt; 64 CPUs<\/a>.<\/p>\n<h2><a id=\"user-content-hardware-intrinsic-api-changes\" class=\"anchor\" href=\"#hardware-intrinsic-api-changes\" aria-hidden=\"true\"><\/a>Hardware Intrinsic API changes<\/h2>\n<p>The ARM64 intrinsics are not going to be considered stable for .NET Core 3.0. They were removed from in box and moved to a separate <code>System.Runtime.Intrinsics.Experimental<\/code> package that is available on our MyGet feed. This is a similar mechanism to what we did for the x86 intrinsics in .NET Core 2.1<\/p>\n<p>Note: The following changes did not make Preview 4. They are already in the master branch and will be part of Preview 5.<\/p>\n<p><del>The <code>Avx2.ConvertToVector256*<\/code> methods were changed to return a signed, rather than unsigned type. This puts them inline with the <code>Sse41.ConvertToVector128*<\/code> methods and the corresponding native intrinsics. As an example, <code>Vector256&lt;ushort&gt; ConvertToVector256UInt16(Vector128&lt;byte&gt;)<\/code> is now <code>Vector256&lt;short&gt; ConvertToVector256Int16(Vector128&lt;byte&gt;)<\/code>.<\/del><\/p>\n<p><del>The <code>Sse41\/Avx.ConvertToVector128\/256*<\/code> methods were split into those that take a <code>Vector128\/256&lt;T&gt;<\/code> and those that take a <code>T*<\/code>. As an example, <code>ConvertToVector256Int16(Vector128&lt;byte&gt;)<\/code> now also has a <code>ConvertToVector256Int16(byte*)<\/code> overload. This was done because the underlying instruction which takes an address does a partial vector read (rather than a full vector read or a scalar read). This meant we were not able to always emit the optimal instruction coding when the user had to do a read from memory. This split, allows the user to explicitly select the addressing form of the instruction when needed (such as when you don&#8217;t already have a <code>Vector128&lt;T&gt;<\/code>).<\/del><\/p>\n<p><del>The <code>FloatComparisonMode<\/code> enum entries and the <code>Sse<\/code>\/<code>Sse2.Compare<\/code> methods were renamed to clarify that the operation is ordered\/unordered and not the inputs. They were also reordered to be more consistent across the SSE and AVX implementations. An example is that <code>Sse.CompareEqualOrderedScalar<\/code> is now <code>Sse.CompareScalarOrderedEqual<\/code>. Likewise, for the AVX versions, <code>Avx.CompareScalar(left, right, FloatComparisonMode.OrderedEqualNonSignalling)<\/code> is now <code>Avx.CompareScalar(left, right, FloatComparisonMode.EqualOrderedNonSignalling)<\/code>.<\/del><\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"user-content-assembly-load-context-improvements\" class=\"anchor\" href=\"#assembly-load-context-improvements\" aria-hidden=\"true\"><\/a>Assembly Load Context Improvements<\/h2>\n<p>Enhancements to AssemblyLoadContext:<\/p>\n<ul>\n<li>Enable naming contexts<\/li>\n<li>Added the ability to enumerate ALCs<\/li>\n<li>Added the ability to enumerate assemblies within an ALC<\/li>\n<li>Made the type concrete \u2013 so instantiation is easier (no requirement for custom types for simple scenarios)<\/li>\n<\/ul>\n<p>See <a href=\"https:\/\/github.com\/dotnet\/corefx\/issues\/34791\">dotnet\/corefx #34791<\/a> for more details.<\/p>\n<p>The <a href=\"https:\/\/github.com\/richlander\/testapps\/blob\/master\/appwithalc\/appwithalc\/Program.cs\">appwithalc<\/a> sample demonstrates these new capabilities. The output from that sample is displayed below.<\/p>\n<div class=\"highlight highlight-text-shell-session\">\n<pre class=\"lang:default decode:true\">Hello ALC(World)!\r\n\r\nEnumerate over all ALCs:\r\nDefault\r\n\r\nEnumerate over all assemblies in \"Default\" ALC:\r\nSystem.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e\r\nappwithalc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\r\nSystem.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\nSystem.Runtime.Loader, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\ninterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\r\nSystem.Console, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\nSystem.Runtime.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\nSystem.Threading, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\nSystem.Text.Encoding.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\r\n\r\nLoad \"library\" assembly via new \"my custom ALC\" ALC\r\nFoo: Hello\r\n\r\nEnumerate over all assemblies in \"my custom ALC\" ALC:\r\nlibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\r\n\r\nEnumerate over all ALCs:\r\nDefault\r\nmy custom ALC\r\n\r\nLoad \"library\" assembly via Assembly.LoadFile\r\nFoo: Hello\r\n\r\nEnumerate over all ALCs:\r\nDefault\r\nmy custom ALC\r\nAssembly.LoadFile(C:\\git\\testapps\\appwithalc\\appwithalc\\bin\\Debug\\netcoreapp3.0\\library.dll)<\/pre>\n<\/div>\n<h2><a id=\"user-content-closing\" class=\"anchor\" href=\"#closing\" aria-hidden=\"true\"><\/a>Closing<\/h2>\n<p>Thanks for trying out .NET Core 3.0. Please continue to give us feedback, either in the comments or on GitHub. We are listening carefully and will continue to make changes based on your feedback.<\/p>\n<p>Take a look at the <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2018\/12\/04\/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks\/\" rel=\"nofollow\">.NET Core 3.0 Preview 1<\/a>, <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-2\/\" rel=\"nofollow\">Preview 2<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-3\/\" rel=\"nofollow\">Preview 3<\/a> posts if you missed those. With this post, they describe the complete set of new capabilities that have been added so far with the .NET Core 3.0 release.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we are announcing .NET Core 3.0 Preview 4. It includes a chart control for Windows Forms, HTTP\/2 support, GC updates to use less memory, support for CPU limits with Docker, the addition of PowerShell in .NET Core SDK Docker container images, and other improvements. If you missed it, check out the improvements we released [&hellip;]<\/p>\n","protected":false},"author":336,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[196,509],"tags":[],"class_list":["post-22762","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet-core","category-wpf"],"acf":[],"blog_post_summary":"<p>Today, we are announcing .NET Core 3.0 Preview 4. It includes a chart control for Windows Forms, HTTP\/2 support, GC updates to use less memory, support for CPU limits with Docker, the addition of PowerShell in .NET Core SDK Docker container images, and other improvements. If you missed it, check out the improvements we released [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22762","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\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=22762"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22762\/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=22762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=22762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=22762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}