Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Including a Converter from the MAUI Community Toolkit in a .NET MAUI 9 app triggers a warning
When referencing a converter (e.g. from the MAUI Community Toolkit) in XAML, xamlc generates a warning with code XC0103 in .NET 9 RC1. On .NET 8 this warning was not there.
This is especially annoying in projects where TreatWarningsAsErrors is enabled.
⚠️ The warning log below is a sample. However, this is an issue for all converters, not only for this specific IsNullConverter.
XamlC warning XC0103: Consider attributing the markup extension "CommunityToolkit.Maui.Converters.IsNullConverter" with [RequireService] or [AcceptEmptyServiceProvider] if it doesn't require any.
Expected Behavior
ValueConverters from the MAUI Community Toolkit can be included without triggering errors
Steps To Reproduce
- Create new MAUI project on .NET 9 RC1
- Add a converter to the main page's resources from the MAUI Community Toolkit
- Run
dotnet build
- See the warning
Link to public reproduction project repository
https://github.com/hansmbakker/bugrepro-converter-issue
Environment
- .NET MAUI CommunityToolkit: 9.0.3
- OS:
- .NET MAUI: 9.0 RC1
Anything else?
This is caused by dotnet/maui#19650 / dotnet/maui#19945.
ValueConverters are expected to be attributed by RequireService or AcceptEmptyServiceProvider.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Including a Converter from the MAUI Community Toolkit in a .NET MAUI 9 app triggers a warning
When referencing a converter (e.g. from the MAUI Community Toolkit) in XAML,
xamlcgenerates a warning with codeXC0103in .NET 9 RC1. On .NET 8 this warning was not there.This is especially annoying in projects where
TreatWarningsAsErrorsis enabled.IsNullConverter.Expected Behavior
ValueConverters from the MAUI Community Toolkit can be included without triggering errors
Steps To Reproduce
dotnet buildLink to public reproduction project repository
https://github.com/hansmbakker/bugrepro-converter-issue
Environment
Anything else?
This is caused by dotnet/maui#19650 / dotnet/maui#19945.
ValueConverters are expected to be attributed by
RequireServiceorAcceptEmptyServiceProvider.