Repository navigation
Update to .NET 11 - #3331
Merged
Merged
Update to .NET 11#3331
Conversation
VladislavAntonyuk
force-pushed
the
net11
branch
from
October 4, 2026 15:05
8ff03f6 to
66f02d6
Compare
5 of 6 tasks
…3331) The Bing Maps library is deprecated (removed in #3344) and Bing Maps is retired. .NET MAUI 10+ ships Microsoft.Maui.Controls.Maps (WinUI 3 MapControl + Azure Maps on Windows) as the replacement, so the toolkit's Maps package is removed entirely: library, sample pages/ViewModels, solution and project references, CI build/pack steps, and the dependabot entry. Fixes #3190. Co-Authored-By: Claude Code <noreply@anthropic.com>
The repo pinned the RC 1 SDK and the RC 1 .NET MAUI packages. The RC 1 SDK has no Tizen workload manifest, so both Build Library jobs stopped at "Install Tizen Workload", and the RC 1 Microsoft.Maui packages reference a newer Java.Interop than the Android workload the SDK installs (CS1705 on every net11.0-android project). - TOOLKIT_NET_VERSION: 11.0.100-rc.3.26522.148 (latest public .NET 11 SDK) - MauiPackageVersion and the sample's Microsoft.Maui.Controls: 11.0.0-rc.2.26505.5 - Microsoft.Extensions.Logging.Debug and System.Speech: 11.0.0-rc.3.26522.148 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under NET11_0 the test verifiers still used ReferenceAssemblies.Net.Net100, so every snippet that references the net11.0 toolkit or .NET MAUI assemblies failed with CS1705 (System.Runtime 11.0 vs 10.0). Microsoft.CodeAnalysis.Testing 1.1.4 has no Net110 preset yet, so the net11.0 reference assemblies are built directly from Microsoft.NETCore.App.Ref. Also: - Tests_RuntimeAsync_ShippedAssemblies: add the missing `using Xunit;`, follow the repo's code style (IDE0040, IDE1006, tabs), and use MethodImplAttributes.Async, which .NET 11 defines (0x2000). - dotnet-format-daily.yml: install the .NET 11 SDK that global.json requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The .NET 11 iOS SDK rejects any explicit PublishTrimmed value ("iOS projects do
not support setting 'PublishTrimmed' to any value"). Its default for Release
device builds, MtouchLink=SdkOnly, already maps to TrimMode=partial.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the toolkit targets only .NET 11 Keep the always-taken .NET 11 branch everywhere. For StatusBar on iOS that is the Window.StatusBarTheme path; the .NET 10 preferredStatusBarStyle replacement and its device tests are gone, as are the NetVersion tests in the csproj files. The '#if IOS' conditions that also tested NET11_0_OR_GREATER keep their non-iOS branch, which is the Android StatusBar.SetStyle call. What only the .NET 10 code used goes too: AndroidManifest.net11.xml now is AndroidManifest.xml (minSdkVersion 24), the keepPresentingViewLoaded parameter of the StatusBar device tests, and the result of the StatusBar.TryUpdateStatusBarAppearance() overload that updates every window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… culture, plus Turkish tests for Gravatar, MediaSource and the validation behaviors A culture-sensitive ToLower turned 'monsterid' into 'monsterıd' in tr-TR and az-Latn-AZ, which Gravatar does not recognize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3344 changed, and a pointer to the culture instructions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…UIKitStyle, now that the toolkit targets only .NET 11 UIKitStyle keeps its .NET 11 path, method_getImplementation: on .NET 11 the toolkit replaces no preferredStatusBarStyle implementation. The .NET 10 path read the implementations that the toolkit's replacement kept (ToolkitReplacement, which went with the .NET 10 device tests), and the comment no longer names .NET 10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only. The app is built with Xcode 27 (27.0 on .NET 11, not 27.1), the job's workload cache key now matches the xcode-27 jobs through the .NET 11 SDK (not .NET 10's 10.0.403), and a comment says why Xcode 26.6 is enough: the .NET 11 workload's exact-Xcode check (E0191) runs only in a build, and this job only evaluates the project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… answer to the style of the whole app, which iOS 26 seems to apply On iOS 26 the scene already shows the window's LightContent when the toolkit reads it back, so the real call looked applied there and the toolkit correctly did not trace. The test is about when the toolkit traces, so it records UIKit's answer like the other style tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The final .NET 11 GA dependency switch remains pending, requiring maintainer validation of package/runtime compatibility and platform/device CI, particularly for Windows-only preview runtime-async assets.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Resolve the conflicts from main's post-991e2cba commits: - Keep the Maps removal: delete the windows device tests, MapTestSupport, MapsAppBuilderExtensionsTests and DeprecationMessages.shared.cs that main's formatting robot touched. - DeviceTests.Runners: take main's XHarness.TestRunners.Xunit 26556.1 so it stays on the same version as the xharness CLI in .config/dotnet-tools.json, keep the Logging.Console 11.0.0-rc.3 reference that matches the rest of the .NET 11 RC3 package graph. - NavigationBarNullArgumentTests: keep net11's removal of the obsolete CA1416 pragma pair that main only re-touched as a whitespace nit. Co-Authored-By: Claude Code <noreply@anthropic.com>
.NET MAUI 11.0.0, and 11.0.0 of Microsoft.Extensions.Logging.Debug, Microsoft.Extensions.Logging.Console, System.Speech and the reference assemblies of the analyzer and source generator tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheCodeTraveler
marked this pull request as ready for review
November 10, 2026 16:26
- The library builds with TOOLKIT_NET_VERSION (11.0.100) and MauiPackageVersion; its Xcode is pinned by the new CommunityToolkitLibrary_Xcode_Version (27.2). - The sample builds with LATEST_NET_VERSION and the latest .NET MAUI release (Microsoft.Maui.Controls Version="*" again, now that MAUI 11 is stable). CommunityToolkitSample_Xcode_Version tracks the Xcode version that release requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheCodeTraveler
approved these changes
Nov 10, 2026
TheCodeTraveler
enabled auto-merge (squash)
November 10, 2026 19:48
TheCodeTraveler
disabled auto-merge
November 10, 2026 19:48
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
Migration to .NET 11.
Besides the straight .NET 10 to .NET 11 port, this PR removes
CommunityToolkit.Maui.Mapsand Tizen support, enables .NET 11 runtime async for the Windows build only, raises the minimum OS versions to .NET MAUI 11's, and makes the converters honor the culture that .NET MAUI 11's newConverterCulturepasses to them.Review guide (for maintainers)
CommunityToolkit.Maui.Maps. It was deprecated in Add Device Tests, Apply Fixes for Bugs Found #3344. The toolkit added it only because .NET MAUI's Map didn't support Windows; since .NET MAUI 10 it does (WinUI 3MapControl+ Azure Maps), and Bing Maps, which the library used on Windows, is retired. The library, its sample pages, CI steps and solution entries are gone.[SupportedOSPlatform("Tizen6.5")]attributes, Tizen code paths, the sample's Tizen platform folder and the CI "Install Tizen Workload" steps are removed.net11.0-windowsbuild only (Directory.Build.targets). Runtime async replaces the compiler-generated async state machines, but it needs CoreCLR. Windows always runs CoreCLR. Android and iOS can still run on Mono (UseMonoRuntime=true), and the plainnet11.0asset is what Blazor WebAssembly (Mono) consumes, so those builds stay classic.Tests_RuntimeAsync_ShippedAssembliesfails if runtime-async code ever reaches the plainnet11.0assemblies.AppBuilderExtensions[SupportedOSPlatform]attributes. Camera's Windows minimum moves from 10.0.10240 to 10.0.17763 like the other libraries, and the version checks and[SupportedOSPlatform]attributes that are always true at these minimums are removed (the ones in Add Device Tests, Apply Fixes for Bugs Found #3344's code after it merges).DrawingViewon iOS and Mac Catalyst. iOS and Mac Catalyst run on CoreCLR by default in .NET 11.DrawingViewServiceread theCGColorof a temporaryUIColorwithout keeping it alive (Generated API bindings aren't GC safe dotnet/macios#10146), so an image export off the main thread could crash.FileSaverandFolderPickeron Windows pick the dialog's owner window the same way on .NET 11 as on .NET 10 (Process.MainWindowHandle). The .NET 11 branch usedApplication.Windows[0], so an app with no visible window got a dialog instead of the documented exception, an app with no windows got anArgumentOutOfRangeException, and .NET MAUI embedded in a WinUI app got a false "No active window found". Canceling theCancellationTokennow also closes the open dialog: the Windows App SDK pickers that .NET 11 uses ignoreCancel()while their dialog is open, so the toolkit closes the dialog its pick opened (PickerCancellation.windows.cs). Toolkit picks on one window take turns, so that a cancel closes only its own pick's dialog.CultureInfothat .NET MAUI 11 passes. .NET MAUI 11 addsBinding.ConverterCultureandMultiBinding.ConverterCulture(Add Binding converter culture support dotnet/maui#35821). The toolkit's converters now use the culture they receive instead of the thread's culture, andEventToCommandBehaviorgets an opt-inEventArgsConverterCulture. This also fixes culture bugs that predate .NET 11 (see the converters' sections under "Breaking changes and behavior changes" in Additional information). A Turkish (tr-TR, az-Latn-AZ) audit fixed the rest: the source generators no longer emitınternal partial classor culture-formatted numbers on a Turkish or comma-decimal build machine, and every culture-aware converter and every existingCurrentCulturetest also runs in Turkish..github/instructions/culture.instructions.mdtells contributors and agents how to keep it that way.#if NET11_0_OR_GREATERwas always true and its#elsebranch never compiled; the project files' .NET 10NetVersionconditions go too. The ones in files that Add Device Tests, Apply Fixes for Bugs Found #3344 changes are removed after it merges.#if NET11_0stays in the analyzer and source-generator test bases, as a reminder to update their reference assemblies for the next .NET version.main(with Add Device Tests, Apply Fixes for Bugs Found #3344, 991e2cb) is merged in. The commits after the merge port Add Device Tests, Apply Fixes for Bugs Found #3344 to .NET 11: they remove the Maps and Tizen code, the always-true OS-version checks and the .NET 10 conditionals that Add Device Tests, Apply Fixes for Bugs Found #3344 added; move its workflows and device-test infrastructure to .NET 11 and Xcode 27; and adjust device tests for .NET MAUI 11 (the ticker when animations are off, the Windows CollectionView handler opt-out for [BUG] TouchBehavior on a Label or Image at the root of a CollectionView item crashes the app on .NET 11 Windows (.NET MAUI 11 CollectionViewHandler2) #3375, picker dialogs, the iOS status bar on iOS 26). They also fix the Gravatar default-image keyword under Turkish and a soft-keyboard test helper on Android 9 and 10.Microsoft.CodeAnalysis.Testing1.1.4 has noNet110preset yet), set in one shared helper,src/Shared/TestReferenceAssemblies.cs; the Sample references .NET MAUI through$(MauiPackageVersion)like the libraries; the workflows use the .NET 11 SDK; the Sample app no longer setsPublishTrimmedon iOS (the .NET 11 iOS SDK rejects any value; its default trims the same way).11.0.100-rc.3.26522.148) and .NET MAUI 11 RC 2 (11.0.0-rc.2.26505.5). (pending) The last commit moves to the .NET 11 GA versions expected on 2026-11-10 (SDK11.0.100, .NET MAUI11.0.0, runtime packages11.0.0,global.jsonback toallowPrerelease: false), so CI is red from that commit until those packages are published.Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal): Deprecate Map Control in favor of MAUI Map implementation #3190 (the Maps removal) is linked but has noapproved/Championedlabel, and the .NET 11 migration itself has no issue; the maintainers decided both.Tests_RuntimeAsync_ShippedAssembliesguards the runtime-async scoping, the analyzer, code-fix and source-generator tests now run against .NET 11 reference assemblies, and every converter culture change has tests with explicit cultures (58 new tests). CI on c0e99c5 passed the unit tests (11923 of 11923) on Windows and macOS, and the analyzer (17), source-generator (141) and MediaElement source-generator (23) tests on Windows.mainat time of PREventArgsConverterCulture; it builds on Swap to using IValueConverter for the EventToCommandBehavior #665 and stays a draft until the release is published)Additional information
Known issue (Windows, .NET MAUI 11): #3375. .NET MAUI 11's new default Windows
CollectionViewhandler (CollectionViewHandler2) ends the app when aTouchBehaviororImageTouchBehaviorsits on a bareLabel/Image/ShapeView/ActivityIndicatorat the root of an item template. Workaround: make a layout the item root, or set<UseWindowsCollectionView2Handler>false</UseWindowsCollectionView2Handler>. The device tests opt out for now; a toolkit-side mitigation is designed and tracked there.Tested on (CI on fdc05af, .NET 11 RC 3 SDK with the .NET MAUI 11 RC 2 workload):
shared.env): passed.net11.0-windows10.0.19041assemblies contain runtime-async methods (MethodImplAttributes.Async): CommunityToolkit.Maui 46, Core 20, Camera 17, MediaElement 7. Thenet11.0, Android, iOS and Mac Catalyst assemblies contain none. The state machines that remain on Windows belong toasync voidmethods, which runtime async does not convert.Breaking changes and behavior changes (for the GitHub Release notes)
To move to .NET 11 and .NET MAUI 11, remove Maps and Tizen, and fix certain bugs, we did have to modify some APIs and the associated underlying behavior. Please find the features you use, below, and update your apps accordingly.
The baselines are the released packages: CommunityToolkit.Maui and CommunityToolkit.Maui.Core 15.0.1, Camera 6.1.0, MediaElement 10.0.0 and Maps 4.0.0 (its last release). The changes from #3344 are listed in that PR.
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.
🤖 Generated with Claude Code