Repository navigation
·
12 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
This release updates CommunityToolkit.Maui to .NET 11.
It also enables Runtime Async only on the net11.0-windows TFM. Runtime Async is not enabled on the Mono Runtime and is not recommended for any NuGet library that may be consumed by an app using the Mono Runtime.
We have removed code supporting the Tizen TFM as Tizen was no longer supported in .NET MAUI starting with .NET 10.
We have also removed code supporting CommunityToolkit.Maui.Maps. See the Release Notes for CommunityToolkit.Maui.Maps v5.0.0 for more information.
Breaking Changes
The update to .NET 11 required us to modify some APIs and their underlying behavior. Please find the features you use, below, and update your apps accordingly.
All packages
-
API
- Minimum OS versions in the API. The
AppBuilderExtensionsclasses declare[SupportedOSPlatform]iOS 15.0, Mac Catalyst 17.0 and Android 24.0 (MediaElement: Android 26.0), the .NET MAUI 11 minimums. Attributes that only restated a version below these minimums are removed or made versionless; this only relaxes the analyzer. Feature-specific changes are in the CameraView, FileSaver and FolderPicker, MediaElement, NavigationBar (Android), SemanticOrderView, and StatusBar and StatusBarBehavior sections. - No Tizen API surface. The Tizen
[SupportedOSPlatform]and[UnsupportedOSPlatform]attributes and the Tizen code paths are removed.
Behavior
- Converters use the culture the binding passes. With no
ConverterCulture, .NET MAUI passesCultureInfo.CurrentUICulture, as .NET MAUI 10 did.- These converters used the thread's
CurrentCultureinstead:ColorToCmykStringConverter,ColorToHslStringConverter,ColorToHslaStringConverter,CompareConverter,IsInRangeConverter,ListToStringConverter,MathExpressionConverterandMultiMathExpressionConverter. - Their output changes only when
ConverterCultureis set or when an app's UI language differs from its regional format. TextCaseConverteralways used invariant casing instead, so its output also changes when the binding's culture is Turkish or Azerbaijani (see its section).- A
nullculture (calling a converter directly) keeps the previous behavior. - Each converter's section says what it does with the culture.
ColorToRgbaStringConverter,DateTimeOffsetConverterandDoubleToIntConverterhave separate changes, also in their sections.
- These converters used the thread's
Setup
- .NET 11 only. The libraries target
net11.0and its platforms; .NET 10 apps should stay on the last .NET 10 releases (CommunityToolkit.Maui 15.x, CommunityToolkit.Maui.Camera 6.x, CommunityToolkit.Maui.MediaElement 10.x). The minimum OS versions are .NET MAUI 11's: iOS 15.0, Mac Catalyst 17.0 (macOS 14), Android 7.0 (API 24), Windows 10 1809 (10.0.17763); CommunityToolkit.Maui.MediaElement still requires Android 8.0 (API 26). .NET MAUI 11 itself no longer supports the older versions. - Tizen is no longer supported. The packages already shipped no Tizen target; .NET MAUI 11 dropped Tizen.
- Dependencies: the libraries reference .NET MAUI 11 (
Microsoft.Maui.Controls11.0.0), and CommunityToolkit.Maui.Core referencesSystem.Speech11.0.0 on Windows (pending: RC versions until the last commit).
Smaller changes
- Windows: the async methods of the
net11.0-windowsassemblies are runtime async. No API or functional change: the compiler no longer generates async state machines for these methods (exceptasync voidones), and the runtime handles their suspension instead. - Informational, from .NET MAUI 11: on iOS and Mac Catalyst, .NET MAUI 11 skips animations while the system's Reduce Motion setting is on, so the toolkit's animations (
TouchBehavior,FadeAnimation, the animation behaviors) finish at once for those users. The toolkit doesn't change this.
- Minimum OS versions in the API. The
CameraView
-
API
- CommunityToolkit.Maui.Camera declares
[SupportedOSPlatform]Windows 10.0.17763 (was 10.0.10240), like the other libraries.
- CommunityToolkit.Maui.Camera declares
ColorConversionExtensions
-
API
- New
ToCmykString(CultureInfo?)andToHslString(CultureInfo?)overloads. Anullculture usesCurrentCulture.
Behavior
ToHslaString(CultureInfo?)formats the hue, saturation and lightness with the given culture too, not only the alpha, so the string no longer mixes two cultures. Anullculture still usesCurrentCulture.
- New
ColorToCmykStringConverter, ColorToHslStringConverter and ColorToHslaStringConverter
-
Behavior
- Percentages are formatted with the culture the binding passes (see All packages).
ColorToHslaStringConverter: the string no longer mixes two cultures (see ColorConversionExtensions).
ColorToRgbaStringConverter
-
Behavior
- Converts back its own output in comma-decimal cultures; before,
RGBA(255,0,0,0,5)under de-DE converted back toTransparent. A direct call with anullculture usesCurrentCultureboth ways. (The HSLA and CMYKA converters are one-way.)
- Converts back its own output in comma-decimal cultures; before,
CompareConverter
-
Behavior
- Strings are compared with the culture's collation, using the culture the binding passes (see All packages).
DateTimeOffsetConverter
-
Behavior
- No longer applies the culture's calendar to the date: it produced wrong years under th-TH and fa-IR and threw under ar-SA. It also keeps sub-microsecond ticks.
DoubleToIntConverter
-
Behavior
- Parses a string
ConverterParameterwith the invariant culture first, soConverterParameter=2.5means 2.5 for every user, and falls back to the binding's culture, so2,5still works in comma-decimal cultures. - A parameter with only
.separators is now always a decimal:1.000under de-DE means 1 (it meant 1000).
- Parses a string
DrawingView
-
Behavior
- On iOS and Mac Catalyst, exporting an image off the main thread no longer risks a crash on .NET 11's CoreCLR (the
CGColorof a temporaryUIColorcould be freed while it was read).
- On iOS and Mac Catalyst, exporting an image off the main thread no longer risks a crash on .NET 11's CoreCLR (the
EventToCommandBehavior
-
API
- New
EventToCommandBehavior.EventArgsConverterCultureproperty (CultureInfo?, defaultnull=CultureInfo.InvariantCulture, the previous behavior).
- New
FileSaver and FolderPicker
-
API
- The
[SupportedOSPlatform]attributesiOS14.0/MacCatalyst14.0onFileSaverandFolderPickerare nowiOS/MacCatalyst(see All packages).
Behavior
- On Windows (.NET 11):
- With no visible app window they fail with
FileSaveException/FolderPickerException("No active window found") as on .NET 10, instead of opening a dialog over a hidden window. - An app with no windows no longer gets an
ArgumentOutOfRangeException, and .NET MAUI embedded in a WinUI app no longer gets a false "No active window found". - Canceling the
CancellationTokencloses the open save or folder dialog and returns a canceled result, as on .NET 10, instead of waiting until the person closes the dialog. If the person has the "Confirm Save As" prompt open, the save ends canceled once they answer it, and nothing is written. - Picks on the same window now take turns: a pick that starts while another
FileSaverorFolderPickerdialog is open on that window waits until that dialog closes, and canceling its token ends the wait with a canceled result. - A cancel can still close a dialog that other code opened on the same window during the canceled pick, such as the app's own message box, because nothing marks a picker dialog as the toolkit's.
- With no visible app window they fail with
- The
GravatarImageSource
-
Behavior
- The default-image keyword sent to Gravatar is lowercased with the invariant culture. Under Turkish and Azerbaijani cultures
identiconandmonsteridwere sent asıdenticonandmonsterıd, which Gravatar doesn't recognize.
- The default-image keyword sent to Gravatar is lowercased with the invariant culture. Under Turkish and Azerbaijani cultures
IsInRangeConverter
-
Behavior
- Strings are compared with the culture's collation, using the culture the binding passes (see All packages).
ListToStringConverter
-
Behavior
- Numbers and dates in the list are formatted with the culture the binding passes (see All packages).
- A custom item type whose
ToString()differs from itsIFormattable.ToString(null, provider)changes output even without a culture.
Maps
-
API
CommunityToolkit.Maui.Mapsis removed. There is no .NET 11 version of the package;UseMauiCommunityToolkitMaps, itsAppBuilderExtensionsandMapHandlerWindowsno longer exist. See Setup below.
Setup
- Change the package and the startup call. Remove the
CommunityToolkit.Maui.Mapspackage, itsusing CommunityToolkit.Maui.Maps;directives and theUseMauiCommunityToolkitMapscall; reference theMicrosoft.Maui.Controls.Mapspackage directly (the toolkit package referenced it for you) and callbuilder.UseMauiMaps()on every platform. - On Windows also call
builder.ConfigureEssentials(essentials => essentials.UseMapServiceToken("YOUR_AZURE_MAPS_SUBSCRIPTION_KEY")), because there the map is the WinUI 3MapControlbacked by Azure Maps and shows no map data without a valid key. - On Windows, .NET MAUI's
Maphas noIsShowingUser, no polygons, polylines or circles inMapElements, no pin labels or info windows, and noMapClicked;MoveToRegion, theStreet,SatelliteandHybridmap types, traffic, scrolling, zooming and pins work. - See https://learn.microsoft.com/dotnet/maui/user-interface/controls/map?view=net-maui-10.0 and #3190.
MathExpressionConverter and MultiMathExpressionConverter
-
Behavior
- The expression syntax is culture-invariant. Numbers in the expression always use
.and every function name works in every culture; before,3.5meant 35 under de-DE and threw under fr-FR, and names containingI(PI,IF,MIN,SIN,INT,CEILING, ...) failed under tr-TR and az. - String inputs and
str()/len()use the culture the binding passes (see All packages). - Quoted strings in the expression are values: they convert with the binding's culture, like the bound inputs, and are lowercased with invariant rules (under tr-TR
"I"becomes"i", not"ı").
- The expression syntax is culture-invariant. Numbers in the expression always use
MediaElement
-
API
maccatalyst16.1, which only restated a version below the new minimums, is removed from MediaElement's iOS members, where #3222 added it after MediaElement 10.0.0 (see All packages).
NavigationBar (Android)
-
API
android23.0is removed fromNavigationBar. This only relaxes the analyzer:NavigationBaris no longer marked Android-only for code built for other platforms, where its platform-specific properties do nothing.
SemanticOrderView
-
API
Android22.0, which only restated a version below the new minimums, is removed fromMauiSemanticOrderView(see All packages).
Source generators
-
Smaller changes
[BindableProperty]and[AttachedBindableProperty]: the generated code no longer depends on the build machine's culture. On a Turkish or Azerbaijani machine aninternalclass generatedınternal partial classand a read-onlyIsBusygeneratedısBusyPropertyKey; in comma-decimal and some other cultures, numeric default values generated invalid literals such as3,1400000000000001or−1(U+2212). All of these broke the app's build. Documentation comments in the generated code also use CRLF on every build machine.
StatusBar and StatusBarBehavior
-
API
android23.0is removed fromStatusBar, and fromStatusBarBehavior, where #3344 added it. This only relaxes the analyzer.
Smaller changes
StatusBaroutside iOS and Android: theNotSupportedExceptionmessage now reads "... is only supported on iOS and Android" (it said "Android 23 and later").
TextCaseConverter
-
Behavior
- Casing uses the culture the binding passes (see All packages); before, it was always invariant. Only Turkish and Azerbaijani dotted and dotless I differ, so the output changes for apps whose UI language or
ConverterCultureis Turkish or Azerbaijani:UpperturnsistanbulintoİSTANBUL(it wasISTANBUL). Anullculture keeps the invariant casing.
- Casing uses the culture the binding passes (see All packages); before, it was always invariant. Only Turkish and Azerbaijani dotted and dotless I differ, so the output changes for apps whose UI language or
What's Changed
- Update to .NET 11 by @VladislavAntonyuk in #3331
Housekeeping
- Bump actions/setup-java from 6.1.0 to 6.2.0 by @dependabot[bot] in #3376
- [housekeeping] Automated PR to fix formatting errors by @github-actions[bot] in #3386
- Bump actions/setup-dotnet from 6.0.0 to 6.1.0 by @dependabot[bot] in #3377
- Bump the dotnet-tools group with 3 updates by @dependabot[bot] in #3379
- Bump Microsoft.Extensions.Logging.Console from 10.0.11 to 10.0.14 by @dependabot[bot] in #3382
- Bump PolySharp from 1.16.0 to 1.17.0 by @dependabot[bot] in #3389
- Bump xunit.v3 from 4.0.2 to 4.0.3 by @dependabot[bot] in #3390
Full Changelog: 16.0.0...17.0.0