Repository navigation
v17.0.0: Update to .NET 11 #3397
TheCodeTraveler
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This release updates
CommunityToolkit.Mauito .NET 11.It also enables Runtime Async only on the
net11.0-windowsTFM. 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 forCommunityToolkit.Maui.Maps v5.0.0for 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
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.[SupportedOSPlatform]and[UnsupportedOSPlatform]attributes and the Tizen code paths are removed.Behavior
ConverterCulture, .NET MAUI passesCultureInfo.CurrentUICulture, as .NET MAUI 10 did.CurrentCultureinstead:ColorToCmykStringConverter,ColorToHslStringConverter,ColorToHslaStringConverter,CompareConverter,IsInRangeConverter,ListToStringConverter,MathExpressionConverterandMultiMathExpressionConverter.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).nullculture (calling a converter directly) keeps the previous behavior.ColorToRgbaStringConverter,DateTimeOffsetConverterandDoubleToIntConverterhave separate changes, also in their sections.Setup
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.Microsoft.Maui.Controls11.0.0), and CommunityToolkit.Maui.Core referencesSystem.Speech11.0.0 on Windows (pending: RC versions until the last commit).Smaller changes
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.TouchBehavior,FadeAnimation, the animation behaviors) finish at once for those users. The toolkit doesn't change this.CameraView
API
[SupportedOSPlatform]Windows 10.0.17763 (was 10.0.10240), like the other libraries.ColorConversionExtensions
API
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.ColorToCmykStringConverter, ColorToHslStringConverter and ColorToHslaStringConverter
Behavior
ColorToHslaStringConverter: the string no longer mixes two cultures (see ColorConversionExtensions).ColorToRgbaStringConverter
Behavior
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.)CompareConverter
Behavior
DateTimeOffsetConverter
Behavior
DoubleToIntConverter
Behavior
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..separators is now always a decimal:1.000under de-DE means 1 (it meant 1000).DrawingView
Behavior
CGColorof a temporaryUIColorcould be freed while it was read).EventToCommandBehavior
API
EventToCommandBehavior.EventArgsConverterCultureproperty (CultureInfo?, defaultnull=CultureInfo.InvariantCulture, the previous behavior).FileSaver and FolderPicker
API
[SupportedOSPlatform]attributesiOS14.0/MacCatalyst14.0onFileSaverandFolderPickerare nowiOS/MacCatalyst(see All packages).Behavior
FileSaveException/FolderPickerException("No active window found") as on .NET 10, instead of opening a dialog over a hidden window.ArgumentOutOfRangeException, and .NET MAUI embedded in a WinUI app no longer gets a false "No active window found".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.FileSaverorFolderPickerdialog is open on that window waits until that dialog closes, and canceling its token ends the wait with a canceled result.GravatarImageSource
Behavior
identiconandmonsteridwere sent asıdenticonandmonsterıd, which Gravatar doesn't recognize.IsInRangeConverter
Behavior
ListToStringConverter
Behavior
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
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.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.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.MathExpressionConverter and MultiMathExpressionConverter
Behavior
.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.str()/len()use the culture the binding passes (see All packages)."I"becomes"i", not"ı").MediaElement
API
maccatalyst16.1, which only restated a version below the new minimums, is removed from MediaElement's iOS members, where Fix iOS MediaElement support for multiple ItemsViews and windows #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 Add Device Tests, Apply Fixes for Bugs Found #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
ConverterCultureis Turkish or Azerbaijani:UpperturnsistanbulintoİSTANBUL(it wasISTANBUL). Anullculture keeps the invariant casing.For maintainers: the GA-day versions
The last commit sets the versions expected at the .NET 11 GA, following the .NET 9 and .NET 10 GA days:
X.0.100(11.0.100);global.jsonback toallowPrerelease: false, asmaindid after the .NET 10 GA.X.0.0on GA day (9.0.0 on 2024-11-12, 10.0.0 on 2025-11-11) ->11.0.0.X.0.0(Microsoft.Extensions.Logging.Debug,System.Speech, the test projects'Microsoft.NETCore.App.Ref) ->11.0.0.On release day CI should only need to run on the last commit.
What's Changed
Housekeeping
Full Changelog: 16.0.0...17.0.0
This discussion was created from the release v17.0.0: Update to .NET 11.
All reactions