-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsplatform/androidplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
The build fails with "Specified cast is not valid." error. I encountered this error while passing an enum value as command parameter. In order to simplify the example, I didn't use Community Toolkit or ICommand.
Steps to Reproduce
Re-produce:
- Try to build.
- See the build error.
Mitigate:
- Change the underlying type of Enum1 (in MainPage.xaml.cs) to int or long.
- Successfully builds and runs
Kind of a workaround
- Set the underlying type of Enum1 to any of byte, sbyte, short, ushort, uint, ulong.
- Comment-out the first label in MainPage.xaml (which uses the Static extension)
- Run the application
- Comment-in the label and hot reload.
- Observe the successfully running code.
Link to public reproduction project repository
https://github.com/selaskar/MauiApp1
Version with bug
9.0.82 SR8.2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsplatform/androidplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working