question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider changing the names of the native app base types (MauiWinUIApplication, MauiApplication, MauiUIApplicationDelegate)

See original GitHub issue

These are the types in question for each platform:

Why change the names?

  • The names are not consistent with each other.
  • These type names are not usually seen by developers, so using up “good” names such as MauiApplication might be a “waste”. These types are typically used once per project in a file generated by the project template (i.e. the user doesn’t type it in)
  • This would mean “good” names such as MauiApplication could be used in more user-facing APIs that are more frequently worked on by developers, such as in the app’s startup code (which, in my experience, changes quite a lot over time)

Why not change the names?

  • The name are consistent with the native base class names, which can be a benefit for someone familiar with the native architecture.
    • This doesn’t preclude doing a rename, but perhaps the rename would be an “uglier” name that bears a resemblance to the native base class.
  • The names are consistent with Xamarin.Forms (somewhat)

Note: This originally came up in this PR (and subsequent discussion in the PR).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Eiloncommented, Oct 22, 2021

Not really done. This issue is a follow-up from that PR where we wanted to consider any further unification or non-unification.

0reactions
Redthcommented, Nov 15, 2021

Considering the weight of this change to existing projects, we decided to leave it for NET6.

In .NET 7 we’ll aim to do more source generation of these boilerplate implementations so these aren’t as user facing. We can also consider obsoleting these in favour of a new name then (and making the obsolete ones subclass the new ones, and then remove them in net8).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consider changing the names of the native app base types ...
Consider changing the names of the native app base types (MauiWinUIApplication, MauiApplication, MauiUIApplicationDelegate) #4281. Sign in to view logs.
Read more >
App lifecycle - .NET MAUI
NET MAUI raises cross-platform lifecycle events when an app transitions between its different execution states.
Read more >
How do I fix below errors with MAUI start up app
Right click your WinUI project in your MAUI solution and choose Properties. Then on the Build tab change the target framework to x86,...
Read more >
Troubleshoot known issues - .NET MAUI
NET Multi-platform App UI (.NET MAUI), and how you can solve or work around them. The .NET MAUI repository also details some known...
Read more >
How do I change the app name for a .Net MAUI app?
Right click to your project > Properties > MAUI Shared > Application Title > Your title With spaces . Your project will still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found