Add [Experimental] To [BindableProperty]#2990
Merged
TheCodeTraveler merged 9 commits intomainfrom Dec 8, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR adds the
[Experimental]To[BindableProperty].As discussed in our December 2025 Standup, our plan is to release
[BindableProperty]in theCommunityToolkit.MauiNuGet Package as an experimental feature that developers are required to opt-in to until we are confident it is ready to be promoted to stable.As Microsoft notes in its documentation, this attribute allows us to ship preview features in a stable library:
With the new
[Experimental]attribute, the this is now the generated code forBindablePropertyAttribute:PR Checklist
mainat time of PRAdditional information
Once we confirm that
[BindableProperty]is stable we will remove[Experimental]promoting it to stable.This PR also adds
<NoWarn>MCTEXP001</NoWarn>toDirectory.Build.propswhich enables our libraries to opt-in to the experimental[BindableProperty]. Without thisNoWarn, the[Experimental]would generate a compiler error.This PR also removes
<InternalsVisibleTo Include="CommunityToolkit.Maui.SourceGenerators.Internal.UnitTests"/>fromDirectory.Build.propsbecause it was causing a compiler error due to the fact thatPolySharpprovides an implementation ofSystem.Diagnostics.CodeAnalysis.ExperimentalAttribute(so that we can use in .NET Standard 2.0 library) which was conflicting a conflicting-types error with the actual .NET 10 implementation ofSystem.Diagnostics.CodeAnalysis.ExperimentalAttributeprovided by the BCL inCommunityToolkit.Maui.SourceGenerators.Internal.UnitTests.