maui icon indicating copy to clipboard operation
maui copied to clipboard

Duplicate Default Style Behaves Strangely

Open david-maw opened this issue 1 year ago • 2 comments

Description

I added a duplicate default style for "Border" in Styles.Xaml and the resulting Windows app failed to run, throwing an exception with the message "Position 10:37. Type converter failed: Exception has been thrown by the target of an invocation.". What I expected was at least an exception with a message indicationg the problem and ideally a compile-time error rather than a run time one. Once I figured out my mistake it was trivial to fix, so this is low priority.

Steps to Reproduce

  1. Create a new MAUI App targeted at .NET 8
  2. Open up Styles.Xaml and insert a copy of one of the default styles.
  3. Build and run it on Windows - the app should fault during initialization with the exception above

Link to public reproduction project repository

No response

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 11

Did you find any workaround?

Don't make the mistake in the first place!

Relevant log output

No response

david-maw avatar Jun 24 '24 23:06 david-maw

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Jun 24 '24 23:06 github-actions[bot]

I can repro this issue on the latest 17.11.0 Preview 2.1(8.0.60 & 8.0.21) When adding duplicate default style for "Border" or others in Styles.Xaml, No error message is reported during compilation, but the error will be displayed during debugging. Users hope that the error will be exposed during compilation.

image

ninachen03 avatar Jun 25 '24 04:06 ninachen03