Obsolete AutomationProperties properties cause XamlC exception on NET 8 #17484
Labels
area-xaml
XAML, CSS, Triggers, Behaviors
fixed-in-8.0.0-rc.2.9373
Look for this fix in 8.0.0-rc.2.9373!
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/android 🤖
platform/iOS 🍎
t/bug
Something isn't working
Milestone
Description
Using
AutomationProperties.Name
orAutomationProperties.Hint
(and I would guess the other deprecatedAutomationProperties
attached properties) inside aDataTemplate
in a control'sResources
generates the errorXamlC error : Object reference not set to an instance of an object.
at compile time.I'm in the process of porting a large app. It previously worked against .NET 7 and did not see this issue.
Steps to Reproduce
Add something like the following to a XAML file:
Link to public reproduction project repository
https://github.com/GalaxiaGuy/MauiBugs/tree/main
Version with bug
8.0.0-preview.1.7762
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI, Yes, this used to work in Xamarin.Forms
Last version that worked well
7.0.92
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Updating the properties to the correct
SemanticProperties
equivalents allows the project to compile. It took some trial and error to work out what was causing the problem though.Relevant log output
No response
The text was updated successfully, but these errors were encountered: