-
Notifications
You must be signed in to change notification settings - Fork 678
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
Fixing CalendarDatePicker's template #881
Fixing CalendarDatePicker's template #881
Conversation
While we're here, is there a way to make warnings-as-errors for the MUX solution so we don't introduce these again? |
Was this manifesting as test failures? Runtime warnings? |
@jevansaks @chrisglein It's showing up in VS as error WMC0151. I can't seem to find any way to turn that warning into an error - the warning-as-errors directive /wennnn only appears to apply to warnings prefixed with C (which I think are C++ compiler warnings?). Do you know if there's a way to do the same thing for XAML warnings? I'm coming up empty, and a search for "WMC warnings Visual Studio" or similar turned up absolutely nothing. |
@danzil Any ideas on this? |
There's no such feature that I know of - that will turn XAML Warnings into Errors (when enabled). It may be possible to write an after-build targets that will look at the warnings emitted and raise an error if needed. We could also take this a feature request and create proper support for it in the Xaml Compiler targets, if there's enough interest. |
Roslyn? |
I do not have an example. My recommendation was based on a purely theoretical example. I can't tell exacly how you would do that without actually trying to do it. :-) |
Finally, adding a comment regarding what the warnings are that we're surfacing as errors.
@jevansaks @danzil So it turns out that there's actually an MSBuild feature as of 15.3 that I've only just now heard about, in which you can just turn an arbitrary warning into an error (or into a message), regardless of origin, instead of relying on the C++ compiler's /we syntax: I tested this out and this does exactly what we wanted, so I've added that to this change. |
CalendarDatePicker's default template currently references two properties added in later versions of XAML without using conditional XAML. This adds conditional XAML to the template in those cases.