Skip to content

SourceGen causing errors in existing app #32762

Closed as duplicate
Closed as duplicate

Description

@dmm-l-mediehus

Description

I enabled it SourceGen in my existing MAUI app .NET 10 (latest).

I am getting lots of CS8820 errors of A static anonymous function cannot contain a reference to 'extension'.
I got 28 errors enabling it.

Image

Here's a line of error from the generated xsg.cs file:

Image

So I had to remove SourceGen.

I don't understand this error and cannot figure it out.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

10.0.10

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

No response

Affected platforms

Android, iOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions