{"id":28754,"date":"2020-06-25T09:41:01","date_gmt":"2020-06-25T16:41:01","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=28754"},"modified":"2020-06-25T12:50:07","modified_gmt":"2020-06-25T19:50:07","slug":"announcing-net-5-0-preview-6","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-5-0-preview-6\/","title":{"rendered":"Announcing .NET 5.0 Preview 6"},"content":{"rendered":"<p>Today, we&#8217;re releasing .NET 5.0 Preview 6. It contains a small set of new features and performance improvements. The <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-5-preview-4-and-our-journey-to-one-net\/\" rel=\"nofollow\">.NET 5.0 Preview 4 post<\/a> covers what we are planning to deliver with .NET 5.0. Most of the features are now in the product, but some are not yet in their final state. We expect that the release will be feature-complete with Preview 8.<\/p>\n<p>You can <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/5.0\" rel=\"nofollow\">download .NET 5.0 Preview 6<\/a>, for Windows, macOS, and Linux:<\/p>\n<ul>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/5.0\" rel=\"nofollow\">Windows and macOS installers<\/a><\/li>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/5.0\" rel=\"nofollow\">Binaries<\/a><\/li>\n<li><a href=\"https:\/\/hub.docker.com\/_\/microsoft-dotnet\" rel=\"nofollow\">Docker images<\/a><\/li>\n<li><a href=\"https:\/\/snapcraft.io\/dotnet-sdk\" rel=\"nofollow\">Snap installer<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/asp-net-core-updates-in-net-5-preview-6\/\">ASP.NET Core<\/a> and<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-entity-framework-core-efcore-5-0-preview-6\/\"> EF Core<\/a> are also being released today. Note: EF Core 5.0 will not support .NET Standard 2.0 or .NET Framework. Read the <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-entity-framework-core-efcore-5-0-preview-6\/\">EF Core post<\/a> to learn more.<\/p>\n<p>You need to use <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" rel=\"nofollow\">Visual Studio 2019 16.7<\/a> to use .NET 5.0. .NET 5.0 is now supported with <a href=\"https:\/\/visualstudio.microsoft.com\/\" rel=\"nofollow\">Visual Studio for Mac<\/a>. Install the latest version of the <a href=\"https:\/\/code.visualstudio.com\/Docs\/languages\/csharp\" rel=\"nofollow\">C# extension<\/a>, to use .NET 5.0 with <a href=\"https:\/\/visualstudio.microsoft.com\/\" rel=\"nofollow\">Visual Studio Code<\/a>.<\/p>\n<p>Release notes:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/tree\/master\/release-notes\/5.0\">.NET 5.0 release notes<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/master\/release-notes\/5.0\/5.0-known-issues.md\">.NET 5.0 known issues<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/37269\">.NET 5.0 Runtime epics<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/releases\/tag\/v5.0.0-preview.6\">GitHub release<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/core\/issues\/4873\">GitHub tracking issue<\/a><\/li>\n<\/ul>\n<h2><a id=\"user-content-windows-arm64-update\" class=\"anchor\" href=\"#windows-arm64-update\" aria-hidden=\"true\"><\/a>Windows ARM64 Update<\/h2>\n<p>We announced support for Windows ARM64 as part of <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-5-preview-4-and-our-journey-to-one-net\/\" rel=\"nofollow\">Preview 4<\/a>. At that time, we had only enabled console and ASP.NET Core apps on Windows ARM64. The Preview 6 SDK now includes support for Windows Forms. That means you can build and run Windows Forms apps on Windows ARM64 devices, just like you would on x64. We&#8217;re still working on adding support for WPF on Windows ARM64.<\/p>\n<p>You can see a <a href=\"https:\/\/github.com\/richlander\/testapps\/tree\/master\/versioninfo-windowsforms\/versioninfo\">sample Windows Forms app<\/a> running on an ARM64 laptop, shown below.<\/p>\n<p><a href=\"https:\/\/user-images.githubusercontent.com\/2608468\/85644370-9497cc00-b64b-11ea-83ae-fe41a2248119.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/user-images.githubusercontent.com\/2608468\/85644370-9497cc00-b64b-11ea-83ae-fe41a2248119.png\" alt=\"2020-05-13\" width=\"573\" \/><\/a><\/p>\n<p>Visual Studio .NET remote debugger support for Windows ARM64 is expected with Visual Studio 16.7. We expect Visual Studio Code .NET remote debugger support to follow soon after that. To avoid confusion, this support is referring to running Visual Studio or Visual Studio Code on an x64 machine, and remote attaching to a running .NET application on a Windows ARM64 machine. In addition, <a href=\"https:\/\/github.com\/microsoft\/vscode\/issues\/98587\">Visual Studio Code is adding support for ARM64<\/a>. We will support the C# extension and the .NET debugger running within the Windows ARM64 version of Visual Studio Code, however, I don&#8217;t have dates to share yet for that.<\/p>\n<h2><a id=\"user-content-windows-forms\" class=\"anchor\" href=\"#windows-forms\" aria-hidden=\"true\"><\/a>Windows Forms<\/h2>\n<p>Visual Basic users are used to being able to enforce that their applications are single-instanced (one instance launched at a time). This behavior is now available via <a href=\"https:\/\/github.com\/dotnet\/winforms\/pull\/3200\">WindowsFormsApplicationBase.IsSingleInstance<\/a>. Here&#8217;s a <a href=\"https:\/\/www.hanselman.com\/blog\/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx\" rel=\"nofollow\">great explanation of this behavior from Scott Hanselman<\/a>. Credit: <a href=\"https:\/\/github.com\/paul1956\">@paul1956<\/a><\/p>\n<p>The team added <a href=\"https:\/\/github.com\/dotnet\/winforms\/issues\/3067\">Collapse Support to ListViewGroup<\/a>. This <a href=\"https:\/\/github.com\/dotnet\/winforms\/pull\/3155\">change<\/a> makes it easier to manage a form with multiple <code>ListViewGroups<\/code>. Credit: <a href=\"https:\/\/github.com\/lonitra\">@lonitra<\/a> (.NET Team intern).<\/p>\n<p>You can see the result shown below.<\/p>\n<p><a href=\"https:\/\/user-images.githubusercontent.com\/30007367\/80524343-4e243a80-8944-11ea-8749-4529c305ae1c.gif\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/user-images.githubusercontent.com\/30007367\/80524343-4e243a80-8944-11ea-8749-4529c305ae1c.gif\" alt=\"collapse2\" \/><\/a><\/p>\n<h2><a id=\"user-content-ryujit-code-quality-improvements\" class=\"anchor\" href=\"#ryujit-code-quality-improvements\" aria-hidden=\"true\"><\/a>RyuJIT code quality improvements<\/h2>\n<p>The RyuJIT team continues to land really important improvements, preview after preview. They didn&#8217;t disappoint with Preview 6. Let&#8217;s take a look:<\/p>\n<ul>\n<li>General improvements\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36146\">Struct handling improvements<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36918\">Optimization to remove redundant zero initializations<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/33308\">ARM64 hardware intrinsics<\/a> implementation progress\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36144\">Implement Duplicate and DuplicateSelectedScalar<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36830\">ASIMD Shift Intrinsics<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36853\">Polynomial Multiply Long Intrinsics<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36267\">Optimize Vector64 and Vector128.Create methods<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36156\">Optimize ToScalar() and GetElement() to use arm64 intrinsic<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36732\">Optimize ToVector128, ToVector128Unsafe and Vector128.GetLower()<\/a><\/li>\n<\/ul>\n<\/li>\n<li>ARM64 generated code improvements: greatly reduced ARM64 code size\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/35675\">Optimize call indirect for R2R, Arm and Arm64 scenarios<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/36817\">Optimize virtual call stub for R2R and JIT<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><a id=\"user-content-single-file-apps\" class=\"anchor\" href=\"#single-file-apps\" aria-hidden=\"true\"><\/a>Single file apps<\/h2>\n<p>We&#8217;ve been continuing to improve <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/36590\">Support Single-File Apps in .NET 5 <\/a>. Our goal is to enable publishing an app as one file (obviously), for Windows, macOS and Linux. We&#8217;re almost there. When we last talked about single file, with <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-5-preview-4-and-our-journey-to-one-net\/\" rel=\"nofollow\">Preview 4<\/a>, I mentioned that Windows &#8220;single file&#8221; apps required a few extra runtime files. We added a <a href=\"https:\/\/github.com\/dotnet\/designs\/blob\/master\/accepted\/2020\/single-file\/design.md#build-system-interface\">new option to include native binaries and any additional content<\/a> (like images) in the single-file. These files will be extracted upon first launch. Apps that target Linux and macOS don&#8217;t need to use this option for native runtime binaries, unless they want to use it for media or other content.<\/p>\n<p>Current limitations:<\/p>\n<ul>\n<li>On Linux, the singlefilehost with runtime components linked in is still to be implemented. Therefore, the runtime native binaries will be published as separate files (similar to Windows experience). <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/37119\">#37119<\/a> , <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/38304\">#38304<\/a><\/li>\n<li>On Linux, ready-to-run assemblies embedded in a bundle are loaded like IL assemblies. <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/38061\">#38061<\/a><\/li>\n<\/ul>\n<h2><a id=\"user-content-native-hosted-application\" class=\"anchor\" href=\"#native-hosted-application\" aria-hidden=\"true\"><\/a>Native hosted application<\/h2>\n<p>Over the years, we&#8217;ve seen a variety of hosting models for .NET in native applications. <a href=\"https:\/\/github.com\/rseanhall\">@rseanhall<\/a> proposed and implemented <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/35465\">a novel new model for doing that<\/a>, which takes advantage of all the built-in application functionality offered by the .NET application hosting layer (specifically loading dependencies), while enabling a custom entrypoint to be called from native code. That&#8217;s perfect for a lot of scenarios, and that one can imagine becoming popular with developers that host .NET components from native applications. That didn&#8217;t exist before. Thanks for the contribution, <a href=\"https:\/\/github.com\/rseanhall\">@rseanhall<\/a>.<\/p>\n<p>Two primary PRs:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/37473\">Enable calling get_runtime_delegate from app context<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/runtime\/pull\/37696\">Implement hdt_get_function_pointer<\/a><\/li>\n<\/ul>\n<h2><a id=\"user-content-breaking-change-removal-of-built-in-winrt-support-in-net-50\" class=\"anchor\" href=\"#breaking-change-removal-of-built-in-winrt-support-in-net-50\" aria-hidden=\"true\"><\/a>[Breaking change] Removal of built-in WinRT support in .NET 5.0<\/h2>\n<p><a href=\"https:\/\/blogs.windows.com\/windowsdeveloper\/2019\/04\/30\/calling-windows-10-apis-from-a-desktop-application-just-got-easier\/\" rel=\"nofollow\">Windows Runtime (WinRT)<\/a> is the technology and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Application_binary_interface\" rel=\"nofollow\">ABI<\/a> that new APIs are exposed with in Windows. You can call those APIs via .NET code, similar to how you would with C++. Support for WinRT interop was added in .NET Core 3.0, as part of adding support for Windows desktop client frameworks (Windows Forms and WPF).<\/p>\n<p>More recently, we&#8217;ve been working closely with the Windows team to change and improve the way that WinRT interop works with .NET. We have replaced the built-in WinRT support with the <a href=\"https:\/\/docs.microsoft.com\/windows\/uwp\/csharp-winrt\/\" rel=\"nofollow\">C#\/WinRT<\/a> tool chain, provided by the Windows team, in .NET 5.0. This <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/37672\">change in WinRT interop is a breaking change<\/a>, and .NET Core 3.x apps that use WinRT will need to be recompiled. We will provide more information on this in coming previews.<\/p>\n<p>The benefits are called out in <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/35318\">Support WinRT APIs in .NET 5<\/a>:<\/p>\n<ul>\n<li>WinRT interop can be developed and improved separate from the .NET runtime.<\/li>\n<li>Makes WinRT interop symmetrical with interop systems provided for other operating systems, like iOS and Android.<\/li>\n<li>Can take advantage of many other .NET features (AOT, C# features, IL linking).<\/li>\n<li>Simplifies the .NET runtime codebase (removes 60k lines of code).<\/li>\n<\/ul>\n<p>For more details, see the official docs issue at <a href=\"https:\/\/github.com\/dotnet\/docs\/issues\/18875\">https:\/\/github.com\/dotnet\/docs\/issues\/18875<\/a>. To see all breaking changes (in dotnet\/runtime) in the release, check out the <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues?q=is%3Aopen+is%3Aissue+label%3Abreaking-change+milestone%3A5.0.0\">.NET 5.0 breaking change query<\/a>.<\/p>\n<h2><a id=\"user-content-platform-support\" class=\"anchor\" href=\"#platform-support\" aria-hidden=\"true\"><\/a>Platform support<\/h2>\n<p>We&#8217;ve updated our <a href=\"https:\/\/github.com\/dotnet\/core\/blob\/master\/release-notes\/5.0\/5.0-supported-os.md\">.NET 5 &#8211; Supported OS versions<\/a> page to capture our latest plans for platform support for .NET 5.0. Please tell us what you think. What are we missing?<\/p>\n<p>We realized that the package manager and container support we offer isn&#8217;t listed on that page. That should be fixed. We plan to add that information before we release .NET 5.0.<\/p>\n<h2><a id=\"user-content-closing\" class=\"anchor\" href=\"#closing\" aria-hidden=\"true\"><\/a>Closing<\/h2>\n<p>We&#8217;re now past the half-way point in this release cycle. In fact, we&#8217;re starting to (in our parlance) &#8220;close down the release&#8221;. If you are watching our repos closely, you&#8217;ll see that we&#8217;re starting to <a href=\"https:\/\/github.com\/dotnet\/runtime\/issues\/38286\">manage the milestones of issues<\/a> more carefully. Having worked on multiple .NET releases now, I can tell you that this is a great time. It&#8217;s time to claim victory on the set of features we&#8217;ve built, and to polish them to the point that you are happy using them. That&#8217;s what we&#8217;re doing now, in our home workplaces.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, we&#8217;re releasing .NET 5.0 Preview 6. It contains a small set of new features and performance improvements. The .NET 5.0 Preview 4 post covers what we are planning to deliver with .NET 5.0. Most of the features are now in the product, but some are not yet in their final state. We expect that [&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":[685],"tags":[],"class_list":["post-28754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet"],"acf":[],"blog_post_summary":"<p>Today, we&#8217;re releasing .NET 5.0 Preview 6. It contains a small set of new features and performance improvements. The .NET 5.0 Preview 4 post covers what we are planning to deliver with .NET 5.0. Most of the features are now in the product, but some are not yet in their final state. We expect that [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/28754","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=28754"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/28754\/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=28754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=28754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=28754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}