Xamarin.Forms 5.0 is Here!

David Ortinau

Today we are publishing the latest stable release of Xamarin.Forms, version 5.0. This major release delivers hundreds of quality improvements and brings to stable release new features including App Themes, Brushes, CarouselView, RadioButton, Shapes and Paths, and SwipeView.

The Xamarin team wishes to extend a huge thank you to the many contributors and reviewers that helped make this release. You are amazing!

Image 5 contribs 1

In past blog posts we have covered features as they previewed, and your feedback has guided us to this stable mark. To explore each new control and experience, check the resources linked below.

Upgrading to 5.0

We have upgraded all our samples, and many of our own projects from versions of Xamarin.Forms going back as far as 3.5 with smooth sailing. There are some things that’ll help you make quick work of the migration. Here’s a quick checklist for success:

  1. Make sure you’re using Visual Studio 2019. This is the minimum version required.
  2. UIWebView has been removed to address Apple’s updated guidance. Unless you have intentionally opted-in to UIWebView then you’re already using the newer WKWebView and won’t need to do anything additional.
  3. MediaElement, Expander, and C# UI markup extensions have been moved to the Xamarin Community Toolkit library. Install this NuGet and update your code accordingly. You’ll probably want this library anyway as it has a lot of valuable solutions every app needs.
  4. DataPages and Theme packages should be removed from your solutions. These experimental packages are no longer being released.
  5. (Optional) MasterDetailPage and related types have been renamed to FlyoutPage and similar. This is a deprecation, and your apps will continue to work for now without making this change, however we recommend refactoring before we get to .NET MAUI.

Resources, Documentation, Samples, and Videos

Check the full release notes for complete details about what’s in the release. We also publish a full API change document that is useful.

New documentation is published for the new features, and much more which you can track on the What’s New page.

The official Xamarin.Forms samples are now updated and ready for you to explore Xamarin.Forms 5.0.

These experiments (use at your own risk) from our team may also be interesting to you as you check out the release:

Blogs previewing many of these features may be found here:

Videos

Image 60s Titles 2

Check out these short tutorials covering these new features on YouTube.

Additionally we have introduced many of the Xamarin.Forms 5.0 content on The Xamarin Show and at .NET Conf 2020.

Get Started

Update your projects to 5.0 via the NuGet Package Manager, clean, restart VS, and rebuild. Let us know how it goes! If you have any issues, please file a report for us on GitHub.

Xamarin.Forms 5.0 will continue to receive service releases through November 2022. .NET MAUI will be the next major feature release with previews of .NET 6 shipping early this year. Xamarin.Forms 5.0 apps will migrate to .NET 6 and upgrade directly to .NET MAUI. We look forward to continuing this evolution with you in 2021!

20 comments

Discussion is closed. Login to edit/delete existing comments.

  • Nino Padrutt 0

    After the update from the latest 4.8 to 5 with no code changes the back navigation under android seems to have changed. When I’m in details page and click on the back button in the shell I do get this error in the console:

    [0:] Shell: Failed to Navigate Back: System.ArgumentException: unable to figure out route for: //D_FAULT_FlyoutItem35/D_FAULT_Tab34/D_FAULT_ShellContent33/Settings/
    Parameter name: uri
      at Xamarin.Forms.ShellUriHandler.GetNavigationRequest (Xamarin.Forms.Shell shell, System.Uri uri, System.Boolean enableRelativeShellRoutes, System.Boolean throwNavigationErrorAsException, Xamarin.Forms.ShellNavigationParameters shellNavigationParameters) [0x0002d] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellUriHandler.cs:143 
      at Xamarin.Forms.ShellNavigationManager.GoToAsync (Xamarin.Forms.ShellNavigationParameters shellNavigationParameters) [0x000b7] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellNavigationManager.cs:44 
      at Xamarin.Forms.ShellSection+NavigationImpl.OnPopAsync (System.Boolean animated) [0x000e9] in D:\a\1\s\Xamarin.Forms.Core\Shell\ShellSection.cs:1088 
      at Xamarin.Forms.Platform.Android.ShellToolbarTracker.OnNavigateBack () [0x0002a] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\ShellToolbarTracker.cs:207 

    Same with the android back button. Do I have to adjust something after the update?

      • Nino Padrutt 0

        With version 5.0.0.6721 I downloaded from DevOps I still get the same issue. I added more infos to how I register the routes in the answer to Shane.

        PS: what is the name of the song in the youtube video? Pretty catchy, but shazam can’t find it ^^

    • Shane NeuvilleMicrosoft employee 0

      If you have issues testing the NuGet from the pipeline can you leave a comment here with the syntax you are using to register your Routes?

      • Nino Padrutt 0

        With version 5.0.0.6721 I downloaded from DevOps I still get the same issue.

        In case that helps anything, the project I’m trying this is OpenSource: Repository

        The way I register that particular root is with:

                <pre class="prettyprint">Routing.RegisterRoute(ViewModelLocator.AccountListRoute, typeof(AccountListPage));</pre>
        

        See here

        ViewModelLocator.AccountListRoute looks like this:

                public static string AccountListRoute => $"Account/{nameof(AccountListPage)}";
        

        See here

        It seems to work with the released version when I change the root to this:

                public static string AccountListRoute => $"Account";
        

        For test purposes you can just start the app, skip the tutorial, go to the statistic via the flyout and choose on of the entries. From there when you try to navigate back you’ll see the error in the console.

          • Nino Padrutt 0

            Hey Shane
            Thanks for having a look at this! I checked the nugets from your linked build and it seems to work as expected.

  • astra A 0

    Can vs2019 choose xamarin 5 by default? Then I don’t have to set the xamarin version every time. Thank you

    • Stewart . 0

      i was wonderingvthe same. it isnt obvious.

    • David OrtinauMicrosoft employee 0

      The templates are updated in 16.9/8.9 version of Visual Studio. It’s in the pipeline and headed your way!

  • hamid 0

    Hi and Thank you for your efforts to improve Xamarin Forms and add new features to it . But I want to Criticize Xamarin Forms for it’s Weakness and Limitations to support Right To Left layout. There are many Bugs and Issues related to Right To Left Layout in GitHub , but almost most of them are not solved so far.(like : Radiobutton , RelativeLayout ,Shapes, Brushes , Shell …)
    I want to know is there any hope and plan to solve these problems?
    Thank you for considering this matter.

  • Rainer Mager 0

    I tried to upgrade to Forms 5.0, but immediately ran into two pretty obvious issue with Shell. The first is that if you have a Shell.FlyoutBackgroundImage it is shown on top of the menu items such that they are not visible. The second is that Shell.TitleView is not shown at all in iOS. I understand that major new releases can have bugs, but these seem like very obvious issues that even relatively basic beta testing should have found. From my point of view, Forms 5.0 is not ready for general usage yet.

      • Rainer Mager 0

        David, thanks for the reply. I look forward to the service release. I’m definitely excited about Forms 5, and hope it goes smoothly when I try the migration again.

  • Boris Krit 0

    Hello Xamarin team! Xamarin.Forms 5 is released, but what about this problem https://github.com/xamarin/Xamarin.Forms/issues/1944?
    I am writing here because we cannot get feedback. Thank.

  • Patric Schmid 0

    I have to admit that I didn’t follow the development of Xamarin 5 and its issues very closely, but holy monké of bananasoftware thats a whole new level of disappointment. I cloned Xappy & Los Gatos, Build and Run on a slow but recent Android phone and it seams that Xamarin is something my phone is to Android to understand…

    Los Gatos:
    – Drag and Drop in Los Gatos is triggered on long press it seams, but a swipe in a List or Collection doesn’t cancel the long press. So swipping content up and down in one go does trigger the long press. So Drag and Drop is not really unusable in lists.
    – Swipe delete doesnt work. Button doesn’t do anything.
    – Favorites (heart icon on tile) doesnt do anything.
    – Add (plus on tile) doenst work.
    – Light bulb button on top in navigation bar to switch theme has a 30% chance to work. No idea why a button has a random chance of not triggering…
    – Switching from Settings to Profile Tab will block switching back to Settings, will have to activate an other first.

    Xappy App is crashing like a 3 year old plaing my favorite racing game:
    – Start App, suspend with home Button => Nullref crash.
    – Scenarios > Map shows a permission dialogue just to crash with it.
    – About is crashing 100%.
    – UIControlls > select anything => no difference in any of the selections.
    – UIControlls > select anything > Anchor inputfiled any input that is not a number => little kiddo crashes the haystack again.
    – I got about 3 other crashes that I dont remember what I clicked, so this one complaint is just for my mood.

    I’m not yet at the point of saying all these issues are Xamarins fault and not also the given examples apps that maybe have issues.
    But my confidence of using this product and building a satifying customer app with it, has taken an other blow.

    So good luck improving your product and if I’ll get more into it I rephrase my complaints in a more detailed and constructive way in the repo.
    But just as a general first impression, that was unfortunately a bummer.

  • Gilles Joseph 0

    Hi David, I am using VS 2019 community edition 16.8.4 on my SP3 running W10 20H2 with all the latest and greatest patches and updates available for the device. I created a new Xamarin Forms mobile project to test the hot restart on my iPhone 12 pro max running iOS 14.4. My phone appears in the VS project, and I have no issues running it in debug mode. There were no issues with the deployment from the output window, and I got the prompt asking to launch the app on my device to continue.

    At first, I couldn’t find App1 on my iPhone. Once I restarted the phone, it appeared. When I launch the app, the splash screen appears, and then it crashes. I tried this on my desktop computer running W10 as well. Same behavior. App1 is just a blank Xamarin Forms mobile app.

    This is my first time using Xamarin Forms. I don’t have a MAC device, but I got a paid apple developer account. I have developed apps for Windows Phone 7/8 back in the days, so I wanted to give Xamarin Forms a try. Any idea what could be going on? Anything I could do to investigate this further?

  • Suporte Movisis 0

    After upgrading Xamarin Forms, from 4.8.0.1560 to the latest version, my iOS app freezes on the splash screen, and I can’t find a reason.
    I couldn’t find anything on the debugger, that could give me a hint.
    Could anyone give me a tip?

Feedback usabilla icon