Skip to main content

Announcing .NET MAUI in .NET 8 Preview 5

Hello everyone! I’m thrilled to announce that .NET MAUI in .NET 8 Preview 5 is now available with lots of bug fixes and performance improvements for cross-platform app development. In this post, I’ll summarize some of the most important changes in this release and show you how to update your .NET MAUI project to use this release.

What’s fixed and improved in .NET MAUI

Preview 5 is another quality-focused update that fixes many issues and enhances the performance of the framework, including:

  • iOS Keyboard Scrolling: ContentInsets were added to improve the scrolling behavior of the iOS keyboard. #14371
  • Test Improvements: Various improvements and fixes were made to the tests, including the removal of the skip attribute from a test related to SearchBarHandler. #14852
  • Performance Enhancements: Performance improvements were made to the {Binding} mechanism and the layout performance of labels on Android. #14830, #14933, #14980
  • Bug Fixes: Several bug fixes were implemented, addressing issues such as gestures in Label Spans, Entry issues with the keyboard, Label truncation on iOS, CollectionView issues, ContentView RTL, and more. #14410, #14382, #14453, #14391, #11763, #15114, #12909

These are just some of the highlights of this release. For a complete list of changes, please check out the release notes.

How to update

Visual Studio 2022 on Windows now includes .NET 8 previews and the .NET MAUI preview workload. Download the latest preview version 17.7 Preview 2, select the .NET Multi-platform App UI workload, and then check the optional component “.NET MAUI (.NET 8 Preview)”.

Visual Studio installer checkbox for .NET MAUI and .NET 8 previews

If you are on macOS, you may download the .NET 8 preview 5 installer, and then install .NET MAUI from the command line:

dotnet workload install maui

To verify that everything is installed correctly, you can run the following command:

dotnet --list-sdks

You should see something like this:

8.0.100-preview.5.23303.2 [C:\Program Files\dotnet\sdk]

And to verify you have the correct .NET MAUI workload, run the command:

dotnet workload list

You should see something like this:

Installed Workload Id      Manifest Version                            Installation Source
-----------------------------------------------------------------------------------------------------------
maui-windows               8.0.0-preview.5.8529/8.0.100-preview.5      VS 17.5.33627.172, VS 17.7.33808.371
maui-maccatalyst           8.0.0-preview.5.8529/8.0.100-preview.5      VS 17.5.33627.172, VS 17.7.33808.371
maccatalyst                16.4.8525-net8-p5/8.0.100-preview.5         VS 17.5.33627.172, VS 17.7.33808.371
maui-ios                   8.0.0-preview.5.8529/8.0.100-preview.5      VS 17.5.33627.172, VS 17.7.33808.371
ios                        16.4.8525-net8-p5/8.0.100-preview.5         VS 17.5.33627.172, VS 17.7.33808.371
maui-android               8.0.0-preview.5.8529/8.0.100-preview.5      VS 17.5.33627.172, VS 17.7.33808.371
android                    34.0.0-preview.5.312/8.0.100-preview.5      VS 17.5.33627.172, VS 17.7.33808.371

Updating existing projects

To update your .NET MAUI project to use 8.0.0-preview.5.8506, you first need to install the .NET 8 Preview 5 SDK and then update the .NET MAUI NuGet packages in your project. You can use Visual Studio or Visual Studio for Mac to manage your NuGet packages or edit your project file manually.

To use Visual Studio or Visual Studio for Mac, right-click on your project and select “Manage NuGet Packages…” then select the “Include prerelease” option and search for Microsoft.Maui. packages. Update all the packages to version 8.0.0-preview.5.8506. To edit your project file manually, open it in a text editor and find the ItemGroup element that contains the PackageReference elements for Microsoft.Maui. packages. Update all the Version attributes to 8.0.0-preview.5.8506.

Your project file should have an ItemGroup that looks something like this:

<ItemGroup>
    <PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
    <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0-preview.5.23280.8" />
</ItemGroup>

Now you can build and run your project using Visual Studio or Visual Studio for Mac or use the dotnet build command with the -t:Run target:

dotnet build -t:Run -f net8-android MyMauiApp.csproj

This will build and launch your app on an Android emulator or device.

Feedback Welcome

We appreciate your feedback and contributions to .NET MAUI. You can report issues, suggest features, or submit pull requests on our GitHub repository. You can also join our Discord server or follow us on Twitter to stay in touch with the latest news and updates.

Thank you for your support and happy coding!

The post Announcing .NET MAUI in .NET 8 Preview 5 appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/announcing-dotnet-maui-in-dotnet-8-preview-5/

What's Hot

CVR Nummer : Register CVR Number for Denmark Generate and Test Online

CVR Nummer : Register CVR Number for Denmark Generate and Test Online | Image credit: Pexel What Is Danish CVR The Central Business Register (CVR) is the central register of the state with information on all Danish companies. Since 1999, the Central Business Register has been the authoritative register for current and historical basic data on all registered companies in Denmark. Data comes from the companies' own registrations on Virk Report. There is also information on associations and public authorities in the CVR. As of 2018, CVR also contains information on Greenlandic companies, associations and authorities. In CVR at Virk you can do single lookups, filtered searches, create extracts and subscriptions, and retrieve a wide range of company documents and transcripts. Generate Danish CVR For Test (Fake) Click the button below to generate the valid CVR number for Denmark. You can click multiple times to generate several numbers. These numbers can be used to Test your ...

Bing Homepage Quiz: Fun, Win Rewards, and Brain Teasers

Bing, Microsoft's search engine, has taken interactive engagement to the next level with its captivating feature - the Bing Homepage Quiz. This intriguing daily quiz not only challenges your knowledge but also offers a chance to earn rewards. In this comprehensive guide, we will explore the ins and outs of the Bing Homepage Quiz, including how to play, the different types of quizzes, and how you can earn and use rewards through this engaging feature. Bing homepage Quiz | Image credit: LanguageLassi How to Play the Bing Homepage Quiz Playing the Bing Homepage Quiz is simple and enjoyable. Here's how you can get started: Visit Bing : Open your preferred web browser and navigate to the Bing homepage (bing.com). Look for the Quiz : On the Bing homepage, keep an eye out for the interactive quiz card. This card is usually located near the bottom of the page and features a captivating image related to the quiz. Click to Start : Click on the quiz card to begin the quiz. It...

How To Iterate Dictionary Object

Dictionary is a object that can store values in Key-Value pair. its just like a list, the only difference is: List can be iterate using index(0-n) but not the Dictionary . Generally when we try to iterate the dictionary we get below error: " Collection was modified; enumeration operation may not execute. " So How to parse a dictionary and modify its values?? To iterate dictionary we must loop through it's keys or key - value pair. Using keys