What’s the correlation between .NET 5, WinUI and MAUI (Xamarin.Forms)

Over the last couple of years there have been a couple of key developments in the .NET world. However, despite a lot of rhetoric from Microsoft about building a better developer ecosystem, the reality is that the current landscape for building apps using .NET is a mess and no amount of sugar coating is going to fix that. In this post I’m going to try to position a number of technologies in the hope that I can share where I think things are going.

UWP

If you’re thinking that I missed UWP out of the list of technologies in the title, you’d be 100% right. Microsoft hasn’t confirmed this (and in much the same way that Silverlight was never discontinued, I doubt anyone will say this) but UWP as it stands today is effectively end-of-life. I wouldn’t be expecting any major updates to UWP any time soon. I doubt it will get NetStandard 2.1 or .NET 5 support.

Let’s keep going and we’ll touch back on this point in order to discuss what the replacement is.

.NET 5

From the .NET homepage, it reads that .NET is “Free. Cross-platform. Open source. A developer platform for building all your apps.” Most of this is true but selling .NET 5 as a technology for building cross platform apps is a straight out lie, unless you include being able to run a command line utility on different operating systems. When we talk about cross platform apps we’re talking about building apps for iOS, Android, Windows etc and currently you cannot do this with .NET 5.

Ok, so why stretch the truth. Well, other than it being a good marketing angle, the reality is a bit more nuanced than simply “it’s not possible.” For example, you can use Xamarin.Forms to build apps for iOS and Android (and Windows at a stretch). Alternatively you could use the Uno Platform to build for Windows, iOS, Android, MacOS, Linux and Web. However, neither of these technologies are based on .NET 5. Both technologies are limited by the lack of .NET 5 support in Xamarin iOS, Xamarin Android and of course UWP.

If not .NET 5, then what’s in store for .NET 6? Well the good news is that there are tons of great changes coming that will make building cross platform apps using .NET much nicer. Microsoft has committed to combining iOS, Android and Windows into a single SDK style project format. They’ve also committed to align with .NET 6, making using of the new TFMs such as .NET6-ios and .NET6-android. This will also rebrand iOS and Android support to .NET for iOS and .NET for Android. These changes alone will have a significant impact on simplifying the development of cross platform apps (although it will need Visual Studio to pull finger and finally provide better tooling for multi-targeted projects).

.NET MAUI (aka Xamarin.Forms vNext)

Earlier this year the Xamarin.Forms team announced some grand plans to evolve the platform with some fundamental changes to how renderers and other plumbing works. This was also going to include adding tier one support for Windows and MacOS. This was going to be coupled with a name change to .NET MAUI to shake the industry perception that XF was just for building forms based applications. The team have documented most of these advances on the roadmap page.

Whilst it appears that progress is being made, the reality is that there is a long way to go to implement these changes. The roadmap started with an 18 month target but recently Microsoft has acknowledged that this has slipped and in fact will be delivered in a number of phases. Microsoft has committed to providing an update shortly, which should clarify the direction.

So, where does that leave Xamarin.Forms developers today? The good news is that the 5.0 release of Xamarin.Forms has a ton of fixes adding to the stability and performance of the platform. The team has committed to a migration path to .NET Maui, so there’s no reason for you not to start or continue building apps with Xamarin.Forms.

However, one thing to be aware of is that there is no .NET 5 support and that until the stars align with .NET 6, Xamarin developers (whether using Xamarin.Forms or not) are going to feel a little exposed as library developers start dropping support for .NET Standard in favour of supporting only .NET 5 (this has already been demonstrated by the EF Core team that have dropped NS2.0 in favour of NS2.1).

Windows UI (aka WinUI)

For those who have built UWP applications you may already be familiar with the Windows UI library of controls (aka WinUI 2.x). It would be easy to confuse WinUI 2.x with WinUI3 and assume that WinUI 3 is simply the next iteration of the controls. This is, in part, true – the controls for WinUI 2.x will be available in WinUI 3, along with a slew of new features. However, what sets WinUI 3 apart is that it is effectively an entire UI platform for building apps. Where in the past developers may have referred to themselves as a UWP developer, going forward developers will refer to themselves as Windows developers, which will translate to building apps using Windows UI.

Currently, there are two flavours of WinUI 3 that are hosted as a desktop app or a UWP app respectively. Initially you might think that the UWP flavour is the priority, considering that WinUI 2.x was a library of controls for UWP. This is not the case – see my earlier point about UWP being end of life. The reality is that WinUI for desktop is the way forward. WinUI for desktop is built on .NET 5 and will enable scenarios from WinForms and WPF, with an opt in model for capabilities taken from UWP like app container (see Project Reunion)

What’s the release timeline for WinUI? According to the roadmap and recent community call, WinUI is still on track for a 2021 release. I suspect that a bunch of features (including UWP and open source) will be dropped in order to make some artificial go-live date, most likely in first half of 2021 (this is pure speculation based on where the previews are at today and hints from the team in their monthly community calls!!!).

Uno Platform

So far I’ve concluded that UWP is end of life and that WinUI is the future of Windows development but what about cross platform? Well this is where the Uno Platform kicks in – the platform today uses UWP as the definition for the cross platform APIs. In essence, the apps you build for Windows using UWP can be taken cross platform to iOS, Android, Web etc by leveraging Uno.

Since UWP is end of life, where does this leave Uno. Well they’ve been working along side the preview releases of WinUI to make available a WinUI compatible build of Uno. Going forward developers will build Windows apps, using WinUI, and will be able to take them cross platform using Uno.

Where does this leave Xamarin.Forms? The reality is that that the availability of WinUI and Uno doesn’t directly impact the trajectory of Xamarin.Forms. However, if you’re comparing technologies, it’s important to remember that at the core Xamarin.Forms and Uno take a vastly different approach. Xamarin.Forms builds on the look and feel of the native controls on each platform. Uno looks to have controls appear uniform across all platforms. Xamarin.Forms allows developers to control the look and feel by adjusting properties, and implementing renderers. Uno unlocks the power of XAML templates to allow developers to completely change the layout of controls without impacting their behaviour.

What is consistent across Xamarin.Forms and Uno is that both technologies are reliant on Xamarin iOS/Android being updated to support .NET 6. Going forward Uno (and potentially Xamarin.Forms if they adopt WinUI for desktop) won’t be limited by the constraints of UWP.

Summary

Currently the landscape for building cross platform apps using .NET can be quite confusing. Let’s simplify it:

  • Today: If you’re working on a project today that needs to release in the coming 3-6 months, you should pick between Xamarin.Forms 5 or Uno
  • Future: For projects in the 6-12 months timeframe, you can consider being an early adopter of WinUI (with Uno) and/or .NET Maui.

21 thoughts on “What’s the correlation between .NET 5, WinUI and MAUI (Xamarin.Forms)”

  1. For cross platform desktop apps, Avalonia is hard to beat. It is actively developed, open source, and has good community support. It is what WPF should have been if Microsoft was invested in it.

  2. > I doubt it will get NetStandard 2.1 or .NET 5 support.

    They’ve been very clear that it’ll get .NET 5 support (and this NS2.1), just that it’s taking them a bit of time and chosen to focus on getting Win32 support out first. I don’t see sandboxed app go away (there’s a need for that!), nor apps for HoloLens and Xbox disappear (hence UWP will have to stay).

    • It’s not that simple – In the last community update Kevin pointed to the decision they’re making to do the reunion work before or after the .net 5/6 support (https://youtu.be/aerGF9kqMJY?t=2755). I’d be betting they do the reunion work first. I’m doubting that what is currently UWP will update to include .net 5/6 support – I think you’ll need to buy into the reunion work in order to take advantage of .net 5/6.
      Also, I’d add that I didn’t say that the sandbox / app container would go away, I was just pointing out that what is currently a uwp app, won’t continue to evolve; imho it will be replaced with the WinUI3+Reunion work.

  3. WinUI, the mostly compatible UWP reboot.

    UWP, the incompatible Silverlight reboot minus its cross platform and web capabilities.

    Silverlight, the cross platform, web enabled partly compatible reboot of WPF.

    WPF, the modern way to create a UI with touch, inking, UI animation, etc. etc., a true revolution in tech.

    Uno, the cross platform, web enabled mostly compatible redo of UWP.

    Xamarin Forms, the cross platform incompatible reinvention of Silverlight minus its web capabilities.

    Hopefully I got the above right.

    WinUI and the whole reunion idea will start off as a giant step backwards. On launch it will be late, unstable, incomplete and poorly supported by third party frameworks. Will it gain traction? No, given the history of the above there is miniscule likelihood of adoption. It’s only saving grace will be that it is mostly compatible with UWP. Microsoft has steadily been eroding its credibility because of the many tech reboots and the fact that it no longer owns any particular computing space (cloud, desktop, mobile, ar/vr, iot).

    Because WinUI moves away from .Net Native, a handful of commercial software companies in their right mind will attempt to use WinUI from C++ because of the ease with which .Net IL is reverse engineered back to C# source code. Anything publishes as IL is effectively a dense repackaging of C# source code unless obfuscation is applied, which is fragile and unstable.

    Some corps will try WinUI. These same corps were already happy with WPF and even happier with Silverlight because you could easily reverse engineer IL and not have to worry about the intentions of developers that went rouge.

    So who is WinUI for? The MS Office team that will continue to do everything in C++ and a handful of “important” customers, the Fortune 100 club that don’t care about disclosing their IP since the projects are for internal use only.

    Microsoft still thinks only MS Office and Fortune 100 matter. For now, that assumption remains true.

    • Interesting perspective…. WinUI will be more successful than UWP alone but will it surpass WPF or WinForms, that’s yet to be seen. There are a bunch of issues beyond what WinUI is attempting to address. These are being picked up by Project Reunion but that’s a long way off.

  4. We dont use Xamarin.Forms, but code against xamarin.iOS and xamarin.Android. I’m trying to find info on the impact for our apps that uses directly xamarin.iOS and xamarin.Android.

    Microsoft documentation is so much Forms oriented that it’s hard to get info on the other foundational parts.

    • Hi, thanks for leaving a comment – I’m not sure what you’re asking for? Yes, Microsoft is pushing Forms as the way to build cross platform but building using Xamarin iOS and Android without forms is fine too.

  5. Interesting article. I wanted to ask you a question. I am a native UWP developer. What will happen to my app? Should I write it in winui? Or will there be small changes to be made? I love uwp and hope they continue to evolve.

    • By native do you mean XAML/C# or XAML/C++? The platform isn’t going away, it’s just evolving. At this stage I would be experimenting with the WinUI previews, and particularly the desktop version, since that’s likely to ship first.

  6. Thank you for calling out Microsoft on how they ignore a platform until it is dead. Please also call out how Azure service agreement lets Microsoft announce 12 months in advance that a service will shut down with no migration path and no replacement service.

    Please call out how .net support lifespans are shorter and shorter. .Net framework is 5+ years, .net core is less than 3 years and non-LTS .net core is 18 months.

    Microsoft is forcing obsolescence on its customers.

    – Silverlight – less than 3 years of active development from v2, the first with usable dialog controls, until microsoft announced it was dead
    – Lightswitch – desktop, then web, then dead in less than 3 years
    – Office VBA – No meaningful language updaets in 10 years. 64 bit support and adding a few new Win32 APIs is not meaningful VBA language, IDE or programming model updates

    Right now, it is only C#, .net 5, SQL Server are stable and going to be around for more than 5 years.

    Blazor – Too early to tell, web front end is done in Angular/React now. Razor based pages and Asp.net MVC are declining in use
    F# – Niche language like R going to be unused by nearly everyone in favor of Python

    Essentially, the last decade has been Microsoft seeking to kill off, abandon, and not carry forward anything that is not a core server software and C#.

    See how Microsoft just announced in Jan 2021 a rewrite of Outlook which has one client for web, mobile, apple, windows, …. I’m expecting it to be a large hot mess like Teams, a broken javascript pile hosted in a win32 web browser control.

  7. I’m a little confused… so in one year….

    – Windows UI is the preferred project because it supports WinForms, UWP, or XAML
    – .NET 6 will be out
    – So that means that I’ll be able to use Windows UI to build cross-platform GUI apps?

    I want to start building a GUI application that I need for Windows in the next few months, but in a year will need apps for Linux/Mac/Android/iOS. Is it a safe bet to start writing using .NET 5 today? I’d rather just start off right from the beginning and not have to refactor code.

    Thanks!

    • For your purposes it might be too early to go down the .net 5 path, particularly if you want to deploy to Windows. I see two paths:
      – Start with UWP today and use Uno platform to build for the other platforms (including web). Migrate to WinUI3 when it’s available for UWP
      – Start with WinUI3 on Desktop (.net5) today but realise that you won’t be able to ship this until MS provides a go-live license. Again, use Uno platform to deliver on other platforms.
      My preference would be the second option, assuming you don’t need to be in Store anytime soon (i.e. within 6months at a guess, although perhaps less). Note that this would prevent your app running on Xbox or SurfaceHub but I can’t imagine they’re going to be a huge market (unless your app is a media or collaboration style app).

  8. Thanks for your reply. So UWP is around to stay?

    I don’t need my app on an device except computers + smartphones. So Windows/Linux/Mac + Android/iPhone.

    Uno looks great to me. I’ve been using WinForms for years and have built some great apps, but I’m not familiar with XAML design. Any recommendations?

    Last question – if I use .NET 5 now and later switch to .NET 6, will THAT work on Mac/Linux/Android/iPhone?

  9. Thanks for the interesting article. It looks like Uno is developed by a separate company, not Microsoft (in constrast to WinUI and MAUI). What do you think about its future perspectives? Is it worth to invest?

    • Yes, that’s correct, Uno is being developed independently. Yes, it’s worth investing cycles into Uno – definitely one of the market leaders in being able to generate cross platform applications.

  10. All this stuff is wrong idea 🙁
    The only right way to create cross-platform UI engine is using cross-platform vector graphics library to draw same look & feel graphics (as this is already done in Chromium & Flutter).
    In .Net world reaaly good solutions are:
    1) NoesisGUI https://www.noesisengine.com/ (they are really cool, but focused on game dev)
    2) https://avaloniaui.net/ (one more cool solution, but without mobile platforms support for now, 100% way for now if you need desktop only)
    3) And Uno… Uno is really unclear. It says “We are UWP” but UWP is not only GUI, it is application lifecycle & some OS API restrictions… But, WNO declares Skia renderers an rendering backend for some platforms… it is good!

    MS doing things wrong:
    1) WinUI – Windows only? In 2021? We do have more iOS & Android devices now then Windows devices!
    2) MAUI, looks like little better Xamarin.Forms. Xamarin.Forms idea of using native UI controls has nothing to deal with in 2020+

    The thing MS should do – port DirectX to actual platforms and come back to WPF with DX rendering backend… or buy NoesisGUI & use it as rendering engine :)))

    • I don’t think there’s a right/wrong way of doing cross platform – the XF/Maui approach has certain benefits, particularly if you want to take advantage of the native platform look and feel.

      As you pointed out I didn’t cover Avaloniaui, mainly because of the lack of mobile support.

      I wouldn’t argue that MS is doing things wrong:
      1) You can think of WinUI as the next iteration of the windows platform, so it’s never going to be cross platform. This is the same as the native frameworks for building iOS and Android apps – they need to exist in order for the cross platform solutions to work.
      2) Yes, Maui is just the next iteration of XF. And yes, the team are struggling to stay relevant – they have a large community that lets developers build very rich looking apps but fundamentally they’re somewhat hamstrung by the dependency on the native controls.

  11. they are abandoning VBA quite officially tho.
    i don’t think they “force obsolescence” malevolently also. .net framework and .net core merge was imminent, as it is the right thing. their coexistence was objectively unavoidable.
    what concerns quick changes in tools and infrastructure. well. you’d be fool if you forcefully stopped evolution. is it too fast? mb. but damn grow while you can, you see road ahead, you discover things along the way, utilize them, feed on them, wtf! you will rest later. “best” is a worst enemy of “good”. “perfect” is not a target, it’s a horizon. burn baby burn
    dixi

  12. Thanks a lot. It slightly clarify things. To me, Microsoft has no clear vision and moreover, they have great difficulties to communicate things clearly, if it is ever possible. But I think that no one at Microsoft really know where they are going. It seems that they lost there vision 10 years ago and since them they are in most dense fog ever created with no leader coming out of it. That situation left field developers in the same fog as internal Microsoft developer and manager are. I feel there is many different teams that don’t talk to each other with no real leader. That’s bad!!!

Comments are closed.