Open
Description
Description
When using UseMauiCompatability
on WinUI when Prism is being used, the app gets NullReferenceException on startup. See: #7949 for the original report of this issue by @anpin.
Steps to Reproduce
- Create a new Maui app
- Add
UseMauiCompatability
- Install Prism.Maui and set it up
- Try to run the app
Expected
App launches fine
Actual
App crashes
Link to public reproduction project repository
https://github.com/BurkusCat/UseMauiCompatibilityWinUIException
Version with bug
6.0 Release Candidate 2 or older
Last version that worked well
6.0 Release Candidate 2 or older
Affected platforms
Windows
Affected platform versions
net6.0-windows10.0.19041.0
Did you find any workaround?
Workaround is to not call UseMauiCompatability
on Windows:
#if ANDROID || IOS || MACCATALYST
// Including this on Windows causes app to crash
builder.UseMauiCompatibility();
#endif
I'm surprised UseMauiCompatibility
does anything on Windows because I don't think there is compatibility provided for UWP custom renderers etc. in Maui.
Relevant log output
No response
Activity