Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET MAUI 9: More compiled bindings updates #2550

Closed
davidbritch opened this issue Oct 7, 2024 · 0 comments · Fixed by #2556
Closed

.NET MAUI 9: More compiled bindings updates #2550

davidbritch opened this issue Oct 7, 2024 · 0 comments · Fixed by #2556
Assignees
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@davidbritch
Copy link
Contributor

davidbritch commented Oct 7, 2024

In .NET MAUI 9:

  • the compiler will produce warnings when x:DataType is missing or explicitly set to x:Null.
  • the compiler will produce warnings when a binding inside of DataTemplate inherits the x:DataType from outside of its scope.
  • all bindings should be annotated with x:DataType to work with NativeAOT and full trimming.

Common pitfalls when switching to compiled bindings

  • Don't ignore XC**** warnings.
    • Fix: Treat these warnings as errors in the .csproj via WarningsAsErrors.
  • Not specifying the annotation on DataTemplates.
    • Fix: Add the missing annotations.
  • Multiple different types applied to a single binding
    • Fix: Use a shared interface.

Associated WorkItem - 322343

@davidbritch davidbritch added doc-enhancement Improve the current content [org] 🏁 Release: .NET 9 Work items for the .NET 9 release 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 7, 2024
@davidbritch davidbritch self-assigned this Oct 7, 2024
@davidbritch davidbritch removed the Pri3 label Oct 7, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant