Skip to content

[.NET10-preview7] XAML Source Generator - Grid Error + Warnings #31142

@bcaceiro

Description

@bcaceiro

Description

Using .net10 Preview 7 , and enabling XAML Source Generator, there is an error with Grids

<Grid RowDefinitions="25,*,1.25"/>

Results in the following build error:
'GridLength' does not contain a constructor that takes 3 arguments

There is also a warning: 'SimpleValueTargetProvider.SimpleValueTargetProvider(object[], object, INameScope[], bool)' is obsolete: 'Use the other ctor'

I have here a minimal sample, but when running in a Real project, this produces a gazillion warnings.

Steps to Reproduce

  1. Create new .net MAUI App - .net 10 preview 7
  2. Enable Xaml Source Generators
  3. Declare a simple Grid with multiple rows / Columns
  4. Build error + warnings

Link to public reproduction project repository

https://github.com/bcaceiro/net9-repros/tree/main/Maui10Preview7

Version with bug

10.0.0-preview.7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

10.0.0-preview.6

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

Disable the XAML Source Generator

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-xamlXAML, CSS, Triggers, Behaviorss/needs-attentionIssue has more information and needs another looks/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions