Skip to content

Conversation

@TheCodeTraveler
Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler commented Jan 16, 2026

Description of Change

In preparation for the release of CommunityToolkit.Maui v14.0.0, this PR moves both AttachedBindablePropertyAttributeSourceGenerator and BindablePropertyAttributeSourceGenerator from CommunityToolkit.Maui.SourceGenerators.Internal.csproj to CommunityToolkit.Maui.SourceGenerators.csproj.

This PR also renames CommunityToolkit.Maui.SourceGenerators.Internal.UnitTests.csproj to CommunityToolkit.Maui.SourceGenerators.UnitTests.csproj.

Both [AttachedBindableProperty<T>] and [BindableProperty] will be released in CommunityToolkit.Maui v14.0.0 with the [Experimental] attribute.

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard

Additional information

This PR also adds <DisableTextColorToGenerator>true</DisableTextColorToGenerator> which provides the functionality to disable TextColorToGenerator inside a csproj.

I've added <DisableTextColorToGenerator>true</DisableTextColorToGenerator> to CommunityToolit.Maui.csproj, CommunityToolkit.Maui.Camera.csproj and CommunityToolkit.Maui.MediaElement.csproj because the TextColorToGenerator only needs to run for projects that add the NuGet Package CommunityToolkit.Maui; it does not need to generate any code inside the aforementioned projects.

The TextColorToSourceGenerator had to be disabled for CommunityToolkit.Maui.Camera.csproj and CommunityToolkit.Maui.MediaElement.csproj because it references CommunityToolkit.Maui.Core which these two projects do not.

The TextColorToSourceGenerator had to be disabled for CommunityToolkit.Maui.csproj because CommunityToolkit.Maui.UnitTests generates TextColorTo() extension methods and the compiler failed to build CommunityToolkit.Maui.UnitTests due to duplicate TextColorTo() methods generated by both CommunityToolkit.Maui and CommunityToolkit.Maui.UnitTests.

Copy link
Member

@ne0rrmatrix ne0rrmatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the tests pass and i do not see any issues. Looks good to go.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants