{"id":45207,"date":"2023-04-11T10:07:00","date_gmt":"2023-04-11T17:07:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=45207"},"modified":"2023-04-11T10:37:55","modified_gmt":"2023-04-11T17:37:55","slug":"announcing-dotnet-maui-in-dotnet-8-preview-3","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-maui-in-dotnet-8-preview-3\/","title":{"rendered":"Announcing .NET MAUI in .NET 8 Preview 3"},"content":{"rendered":"<p>The third preview of <a href=\"https:\/\/dotnet.microsoft.com\/apps\/maui\" rel=\"noopener\" target=\"_blank\">.NET Multi-platform App UI (MAUI)<\/a> in .NET 8 is now available. This release we are focusing on improving the quality of the UI controls, layout, and memory management. Also new in .NET 8 we are introducing NuGet packages for your flexibility to preview future builds and lock your applications to a specific version.<\/p>\n<p>.NET MAUI is one of the <a href=\"https:\/\/www.dnfprojects.com\/!\/Mar-01-2023\/Mar-31-2023\/microsoft\/pr\">most active projects<\/a> in the .NET Foundation. When you combine Android, iOS, and .NET MAUI together, it&#8217;s far and away the most active for issues and pull requests. In less than a year .NET MAUI usage has grown 450%. Our goal in .NET 8 is to make you even more successful using .NET to build apps for Android, iOS, macOS, and Windows with .NET MAUI.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/04\/dotnet-projects-tweet.png\" alt=\"image of tweet by Shaun Walker\" \/><\/p>\n<h2>Improving Quality<\/h2>\n<p>The main focus for our .NET 8 release is improving the quality and stability of the entire product. We have been prioritizing the highest impact issues on the most used controls. Those receiving the most attention have been layout, <code>CollectionView<\/code>, <code>Shell<\/code>, and drawing (shapes, shadows, clipping). <\/p>\n<p>Thus far in .NET 8 we have now resolved 303 issues and merged 713 pull requests. We&#8217;d like to say a huge thank you to the over 50 contributors that have taken part in making .NET MAUI successful!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/04\/maui_8_3_contributors_grid.png\" alt=\"graphic of contributors\" \/><\/p>\n<p>Among some of the most high-impact improvements touch on keyboard with <code>Entry<\/code> and <code>Editor<\/code> interactions (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13499\">#13499<\/a>), <code>Grid<\/code> helper methods (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13408\">#13408<\/a>), and <code>Shell<\/code> lifecycle events (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13177\">#13177<\/a>).<\/p>\n<p>Those are just a few highlights. For complete details, check out the <a href=\"https:\/\/github.com\/dotnet\/maui\/releases\">release notes<\/a>.<\/p>\n<h2>Improving Memory Management<\/h2>\n<p>You need and expect .NET MAUI apps to make efficient use of memory so they remain performant and safely operate for extended periods of time. In .NET 8 we&#8217;ve been on the hunt for memory leaks, and one of our senior engineers, <a href=\"https:\/\/github.com\/jonathanpeppers\">Jonathan Peppers<\/a>, has been documenting the progress. He found that when navigating forward and back repeatedly the memory would grow ~2.45KB each time. By implementing a <code>WeakList&lt;T&gt;<\/code> to keep track of references, he was able to make sure the memory is properly released.<\/p>\n<p>Other areas improved include <code>Button<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14280\">#14280<\/a>), <code>Page<\/code> and <code>Layout<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14108\">#14108<\/a>), <code>Window<\/code>(<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14073\">#14073<\/a>), <code>Shadow<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13960\">#13960<\/a>), <code>Clip<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13806\">#13806<\/a>), <code>Background<\/code> brush (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13656\">#13656<\/a>), <code>BindableLayout<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/13550\">#13550<\/a>), and <a href=\"https:\/\/github.com\/dotnet\/maui\/pulls?q=is%3Apr+memory+is%3Aclosed\">more<\/a>. Additional work is underway to improve memory management in <code>CollectionView<\/code> (<a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14329\">#14329<\/a>). <\/p>\n<p>Several of these have been backported to .NET 7.<\/p>\n<h2>NuGet Packages<\/h2>\n<p>While .NET MAUI continues to be a .NET workload that you install via Visual Studio or the <code>dotnet<\/code> command line, you can now layer specific versions of NuGet packages into your project. This is great for:<\/p>\n<ul>\n<li>reviewing a pull request<\/li>\n<li>previewing unreleased or experimental builds<\/li>\n<li>pinning a project to specific version<\/li>\n<\/ul>\n<p>From any pull request and branch at <a href=\"https:\/\/github.com\/dotnet\/maui\">dotnet\/maui<\/a> you can navigate to the Azure build pipeline by clicking the green checkmark and locating the build artifacts.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/04\/maui-pipeline-01.png\" alt=\"image of GitHub pull request checkmark\" \/>\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/04\/maui-pipeline-02.png\" alt=\"image of GitHub pull request checkmark\" \/>\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/04\/maui-pipeline-03.png\" alt=\"image of Azure pipeline build artifacts\" \/><\/p>\n<p>Download the NuGet artifacts and extract them to a local directory. Within Visual Studio set a NuGet source path to that same directory, or use a <code>nuget.config<\/code> file. Then within your project&#8217;s <code>csproj<\/code> file you can specify the version (e.g. 8.0.0-ci.net8.11560) of that build:<\/p>\n<pre><code class=\"language-xml\">&lt;PropertyGroup&gt;\r\n    &lt;MauiVersion&gt;8.0.0-ci.net8.11560&lt;\/MauiVersion&gt;\r\n&lt;\/PropertyGroup&gt;<\/code><\/pre>\n<p>Additional work is happening to improve your workloads experience in general. For more details, <a href=\"https:\/\/github.com\/dotnet\/sdk\/issues\/30008\">read up on GitHub<\/a>.<\/p>\n<h2>Getting Started<\/h2>\n<p>To begin previewing .NET MAUI in .NET 8 today, <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/8.0\">install .NET 8 Preview 3<\/a> on Linux, macOS, or Windows. Once installed, run the workload installation command from your favorite CLI. <\/p>\n<pre><code class=\"language-console\">dotnet workload install maui<\/code><\/pre>\n<p>Full Visual Studio 2022 support for .NET 8 previews will come in a future release. For a more complete look at the .NET 8 roadmap for .NET MAUI, check out <a href=\"https:\/\/themesof.net\/roadmap?product=.NET&amp;release=8.0&amp;q=area%3AMAUI\">themesof.net<\/a>.<\/p>\n<h3>Feedback Welcome<\/h3>\n<p>We&#8217;d love to hear your feedback. As you encounter issues in the release or have suggestions, please <a href=\"https:\/\/github.com\/dotnet\/maui\/issues\/new\/choose\">open an issue on GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET MAUI makes it&#8217;s way to .NET 8 Preview 3 and is full of new quality improvements for developers across the entire framework. In addition, we are introducing NuGet packages even greater flexibility going forward.<\/p>\n","protected":false},"author":553,"featured_media":45212,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7233],"tags":[7701,7238],"class_list":["post-45207","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-maui","tag-dotnet-8","tag-net-maui"],"acf":[],"blog_post_summary":"<p>.NET MAUI makes it&#8217;s way to .NET 8 Preview 3 and is full of new quality improvements for developers across the entire framework. In addition, we are introducing NuGet packages even greater flexibility going forward.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/45207","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\/553"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=45207"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/45207\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/45212"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=45207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=45207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=45207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}