Add Binding converter culture support - #35821
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35821Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35821" |
AI code review refresh for net11.0 targetHead reviewed: SummaryIndependent read of the diff before the narrative.
The default getter What's good
Findings (non-blocking)
CI note
No PR-caused CI failure was identified. I did not exhaustively open every job, so attribution is high-confidence but not absolute. ConfidenceCode correctness: medium‑high. CI attribution: medium‑high.
|
|
@StephaneDelcroix would you mind taking a look at this one when you have a chance? This targets |
AI code review refresh for net11.0 targetHead reviewed: What changed since the last refresh (
|
kubaflo
left a comment
There was a problem hiding this comment.
PR #35821 — Add Binding ConverterCulture support (issue #5696)
Verdict: NEEDS_DISCUSSION (confidence: medium) — HEAD 0a97f91. The code is well-structured — 3 of 4 models (gpt-5.5, opus-4.6, gemini) return LGTM with only minor suggestions (opus-4.8 timed out without a verdict). The hold is a PR-specific CI failure, below.
Implementation
Adds a ConverterCulture to Binding/MultiBinding/TypedBinding, the XAML BindingExtension, and threads it through both the XamlC (SetPropertiesVisitor) and source-generated (CompiledBindingMarkup/KnownMarkups) binding paths, with PublicAPI.Unshipped.txt entries across all TFMs. Unit tests (BindingConverterCultureTests, MultiBindingTests) and a XAML test (Maui5696 using ConverterCulture='nl-NL') are included.
⚠️ Blocking question — Windows Helix unit-test (Debug) leg is red only on this PR
maui-pr → Run Helix Unit Tests Windows (Debug) is failing on this head (buildId 1461702), while the Release variant passes. I checked the same Debug leg on 4 other concurrently-open PRs (#35597, #35265, #34136, #35922) — it is green on all of them, so this is not the usual flake; it is specific to this PR, which adds the new binding-culture tests.
Likely root cause to check: whether the ConverterCulture string (e.g. 'nl-NL' in Maui5696.xaml) is converted to a CultureInfo (via CultureInfoConverter) consistently across all three binding paths — runtime reflection, XamlC (SetPropertiesVisitor), and SourceGen (KnownMarkups). If one path leaves it as a raw string or applies a different default (CurrentCulture vs InvariantCulture), a culture assertion would fail. Please confirm which test fails on the Windows Debug leg and fix, or confirm it's an unrelated flake via rerun.
Minor suggestions (inline, non-blocking)
- 💡
KnownMarkups.cs:455— generated code allocates a newCultureInfoConverterper binding; consider caching. - 💡
SetPropertiesVisitor.cs:387— considerConverterCultureparity forTemplateBindingExtension.
The other red legs (Build Analysis, AOT macOS, RunOniOS_MauiRelease/TrimFull/CoreCLR) are the known unrelated flakes.
| if (converterCultureNode is ValueNode { Value: string converterCulture }) | ||
| { | ||
| expression += $"ConverterCulture = (global::System.Globalization.CultureInfo)new global::System.ComponentModel.CultureInfoConverter().ConvertFromInvariantString({SymbolDisplay.FormatLiteral(converterCulture, true)})!, "; | ||
| } |
There was a problem hiding this comment.
The source-generated binding code instantiates a fresh CultureInfoConverter for each binding when a ConverterCulture string is present. Since CultureInfoConverter is stateless, consider emitting a single cached/static converter (or converting the culture string once at generation time into a CultureInfo.GetCultureInfo("...") call) to avoid a per-binding allocation on a hot path. Minor — not blocking.
There was a problem hiding this comment.
Good suggestion — addressed in e21a5d0. Literal converter culture values now emit CultureInfo.GetCultureInfo("..."), so generated code no longer allocates a CultureInfoConverter per binding.
|
|
||
| if (bindingExtensionType.Value.Item3 == "BindingExtension") | ||
| { | ||
| // extension.TypedBinding.ConverterCulture = extension.ConverterCulture; |
There was a problem hiding this comment.
For full parity, consider whether ConverterCulture should also be supported on TemplateBindingExtension, which shares much of this binding-construction path. Right now ConverterCulture is wired for Binding/MultiBinding but a TemplateBinding with a converter won't honor a culture. Non-blocking — flagging for completeness/consistency.
There was a problem hiding this comment.
Leaving this out intentionally for this PR. TemplateBindingExtension currently has no ConverterCulture API surface, so adding parity there would require a separate public API addition beyond the Binding/MultiBinding support in scope here.
|
Addressed the source-gen allocation review comment in e21a5d0 by emitting |
✅ LGTM — no blocking issues foundRe-review PR #35821 — Binding
|
e21a5d0 to
21eeedc
Compare
✅ LGTM — no blocking issues foundRe-review PR #35821 — Add Binding
|
This comment has been minimized.
This comment has been minimized.
21eeedc to
4c07549
Compare
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4c07549 to
b511afb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
StephaneDelcroix
left a comment
There was a problem hiding this comment.
approving the API changes
|
🚨 API change(s) detected @davidbritch FYI |
|
🚨 API change(s) detected @davidortinau FYI |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@jfversluis — new AI review results are available based on this last commit:
b511afb. To request a fresh review after new comments or commits, comment/review rerun.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ⚠️ INCONCLUSIVE
Platform: ANDROID · Base: net11.0 · Merge base: 9ee0adb3
🩺 Fix does not compile — applying the PR's fix produces a build error before tests can run. The earlier-than-test failure is the root cause; the per-test ❌ FAIL marks are downstream effects, not real test failures.
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Bz40906.xaml(6,4): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vs...
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🧪 BindingConverterCultureTests BindingConverterCultureTests |
🛠️ BUILD ERROR | ✅ PASS — 153s |
🧪 MultiBindingTests MultiBindingTests |
🛠️ BUILD ERROR | ✅ PASS — 41s |
📄 Maui5696 Maui5696 |
🛠️ BUILD ERROR | 🛠️ BUILD ERROR |
🔴 Without fix — 🧪 BindingConverterCultureTests: 🛠️ BUILD ERROR · 84s
Determining projects to restore...
Restored /home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj (in 1.29 sec).
10 of 11 projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(24,6): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(71,5): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(76,38): error CS1061: 'Binding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'Binding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(77,43): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(94,40): error CS1061: 'Binding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'Binding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(95,45): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(117,13): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(563,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(595,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(615,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(620,31): error CS1061: 'MultiBinding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'MultiBinding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(639,61): error CS1061: 'MultiBinding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'MultiBinding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
🟢 With fix — 🧪 BindingConverterCultureTests: PASS ✅ · 153s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
Controls.Core.UnitTests -> /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll (.NETCoreApp,Version=v11.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.27] Discovering: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:04.08] Discovered: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:04.12] Starting: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:04.39] Finished: Microsoft.Maui.Controls.Core.UnitTests
Passed TypedBindingConverterCultureOverridesCurrentUICulture [65 ms]
Passed BindingConverterCultureOverridesCurrentUICulture [22 ms]
Passed ClonesKeepUnsetConverterCultureDynamic [6 ms]
Passed ClonesPreserveExplicitConverterCulture [< 1 ms]
Test Run Successful.
Total tests: 4
Passed: 4
Total time: 5.5596 Seconds
🔴 Without fix — 🧪 MultiBindingTests: 🛠️ BUILD ERROR · 36s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(24,6): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(71,5): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(76,38): error CS1061: 'Binding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'Binding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(77,43): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(94,40): error CS1061: 'Binding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'Binding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(95,45): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(117,13): error CS1061: 'TypedBinding<MockViewModel, string>' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'TypedBinding<MockViewModel, string>' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(563,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(595,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(615,5): error CS0117: 'MultiBinding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(620,31): error CS1061: 'MultiBinding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'MultiBinding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/MultiBindingTests.cs(639,61): error CS1061: 'MultiBinding' does not contain a definition for 'ConverterCulture' and no accessible extension method 'ConverterCulture' accepting a first argument of type 'MultiBinding' could be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
🟢 With fix — 🧪 MultiBindingTests: PASS ✅ · 41s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
Controls.Core.UnitTests -> /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Core.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Core.UnitTests.dll (.NETCoreApp,Version=v11.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.56] Discovering: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:06.43] Discovered: Microsoft.Maui.Controls.Core.UnitTests
[xUnit.net 00:00:06.49] Starting: Microsoft.Maui.Controls.Core.UnitTests
Passed TestNestedMultiBindings [175 ms]
Passed TestRelativeSources_TypedBinding [216 ms]
Passed TestBindingModes [18 ms]
Passed TestNestedMultiBindings_TypedBinding [15 ms]
Passed TestChildOneWayOnMultiTwoWay [2 ms]
Passed TestConverterWithStringFormat [7 ms]
Passed TestRelativeSources [9 ms]
Passed ClonePreservesDynamicDefaultConverterCulture [5 ms]
Passed ClonePreservesExplicitConverterCulture [< 1 ms]
[xUnit.net 00:00:07.16] Finished: Microsoft.Maui.Controls.Core.UnitTests
Passed TestStringFormat [3 ms]
Passed ConverterCulturePassedToConvertBack [1 ms]
Passed TestConverterReturnValues [5 ms]
Passed TestMultiBindingContinuesUpdatingAfterConvertBack [5 ms]
Passed ConverterCulturePassedToConvert [1 ms]
Test Run Successful.
Total tests: 14
Passed: 14
Total time: 8.5644 Seconds
🔴 Without fix — 📄 Maui5696: 🛠️ BUILD ERROR · 108s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/netstandard2.0/Microsoft.Maui.Graphics.dll
Controls.Xaml.UnitTests.ExternalAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.ExternalAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.ExternalAssembly.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/netstandard2.0/Microsoft.Maui.Essentials.dll
Controls.Xaml.UnitTests.InternalsVisibleAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.InternalsVisibleAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.InternalsVisibleAssembly.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/netstandard2.0/Microsoft.Maui.dll
Controls.Xaml.UnitTests.InternalsHiddenAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.InternalsHiddenAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.InternalsHiddenAssembly.dll
Maui25871Library -> /home/vsts/work/1/s/artifacts/bin/Maui25871Library/Debug/net11.0/Maui25871Library.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/netstandard2.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/netstandard2.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.SourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.SourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.SourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Build.Tasks -> /home/vsts/work/1/s/artifacts/bin/Controls.Build.Tasks/Debug/netstandard2.0/Microsoft.Maui.Controls.Build.Tasks.dll
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Bz40906.xaml(6,4): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Gh2517.xaml(6,13): warning MAUIG2045: Binding: Property "MissingProperty" not found on "global::Microsoft.Maui.Controls.Label". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20616.xaml(12,7): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20768.xaml(6,33): warning MAUIG2045: Binding: Property "Title" not found on "global::Microsoft.Maui.Controls.Xaml.UnitTests.ViewModel20768". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20818.xaml(18,7): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui25871.xaml(14,25): warning MAUIG2045: Binding: Property "UpdateProgress" not found on "global::Microsoft.Maui.Controls.Xaml.UnitTests.Maui25871ViewModel". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui3059.xaml(8,5): error MAUIX2017: Property 'Border.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui5696.xaml(13,5): error MAUIX2002: No accessible property, BindableProperty, or event found for "ConverterCulture", or mismatching type between value and property. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Required.xaml(11,11): warning MAUIX2005: 'global::Microsoft.Maui.Controls.Xaml.UnitTests.RequiredRandomSelector.Template2' has the 'required' keyword. Support for this in XAML is limited at the moment, avoid using it. We're still doing a best effort to provide a value. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/TestSharedResourceDictionary.xaml(19,6): error MAUIX2017: Property 'ContentView.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
🟢 With fix — 📄 Maui5696: 🛠️ BUILD ERROR · 109s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0/Microsoft.Maui.Controls.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0/Microsoft.Maui.Controls.Xaml.dll
TestUtils -> /home/vsts/work/1/s/artifacts/bin/TestUtils/Debug/netstandard2.0/Microsoft.Maui.TestUtils.dll
Maui25871Library -> /home/vsts/work/1/s/artifacts/bin/Maui25871Library/Debug/net11.0/Maui25871Library.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/netstandard2.0/Microsoft.Maui.Graphics.dll
Controls.Xaml.UnitTests.InternalsHiddenAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.InternalsHiddenAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.InternalsHiddenAssembly.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/netstandard2.0/Microsoft.Maui.Essentials.dll
Controls.Xaml.UnitTests.InternalsVisibleAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.InternalsVisibleAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.InternalsVisibleAssembly.dll
Controls.Xaml.UnitTests.ExternalAssembly -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests.ExternalAssembly/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.ExternalAssembly.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/netstandard2.0/Microsoft.Maui.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/netstandard2.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/netstandard2.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.SourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.SourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.SourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14541273
Controls.Build.Tasks -> /home/vsts/work/1/s/artifacts/bin/Controls.Build.Tasks/Debug/netstandard2.0/Microsoft.Maui.Controls.Build.Tasks.dll
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Bz40906.xaml(6,4): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Gh2517.xaml(6,13): warning MAUIG2045: Binding: Property "MissingProperty" not found on "global::Microsoft.Maui.Controls.Label". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20616.xaml(12,7): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20768.xaml(6,33): warning MAUIG2045: Binding: Property "Title" not found on "global::Microsoft.Maui.Controls.Xaml.UnitTests.ViewModel20768". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui20818.xaml(18,7): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui25871.xaml(14,25): warning MAUIG2045: Binding: Property "UpdateProgress" not found on "global::Microsoft.Maui.Controls.Xaml.UnitTests.Maui25871ViewModel". The binding will use slower reflection-based binding at runtime. If this property is generated by another source generator, consider reporting this at https://github.com/dotnet/maui/issues to help us improve source generator interoperability. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Maui3059.xaml(8,5): error MAUIX2017: Property 'Border.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Required.xaml(11,11): warning MAUIX2005: 'global::Microsoft.Maui.Controls.Xaml.UnitTests.RequiredRandomSelector.Template2' has the 'required' keyword. Support for this in XAML is limited at the moment, avoid using it. We're still doing a best effort to provide a value. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/TestSharedResourceDictionary.xaml(19,6): error MAUIX2017: Property 'ContentView.Content' is being set multiple times. Only the last value will be used. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
⚠️ Failure Details
- 🛠️ BindingConverterCultureTests without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(24,6): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Contr...
- 🛠️ MultiBindingTests without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/BindingConverterCultureTests.cs(24,6): error CS0117: 'Binding' does not contain a definition for 'ConverterCulture' [/home/vsts/work/1/s/src/Contr...
- 🛠️ Maui5696 without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Bz40906.xaml(6,4): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vs...
- 🛠️ Maui5696 with fix: build failed (fix does not compile)
/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Issues/Bz40906.xaml(6,4): error MAUIX2017: Property 'ContentPage.Content' is being set multiple times. Only the last value will be used. [/home/vs...
📁 Fix files reverted (21 files)
src/Controls/src/Build.Tasks/SetPropertiesVisitor.cssrc/Controls/src/Core/Binding.cssrc/Controls/src/Core/MultiBinding.cssrc/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txtsrc/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txtsrc/Controls/src/Core/TypedBinding.cssrc/Controls/src/SourceGen/CompiledBindingMarkup.cssrc/Controls/src/SourceGen/KnownMarkups.cssrc/Controls/src/Xaml/MarkupExtensions/BindingExtension.cssrc/Controls/src/Xaml/PublicAPI/net-android/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/net-ios/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/net-tizen/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/net-windows/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/net/PublicAPI.Unshipped.txtsrc/Controls/src/Xaml/PublicAPI/netstandard/PublicAPI.Unshipped.txt
🔗 Regression Cross-Reference
🔍 Regression Cross-Reference
⚠ Overlaps with prior bug-fix PRs — same files modified, but no exact line revert detected.
| File | Fix PR | Fixed issue(s) |
|---|---|---|
src/Controls/src/SourceGen/CompiledBindingMarkup.cs |
#32916 | #13856 |
src/Controls/src/SourceGen/CompiledBindingMarkup.cs |
#33914 | |
src/Controls/src/SourceGen/KnownMarkups.cs |
#34727 | #34726 |
src/Controls/src/SourceGen/KnownMarkups.cs |
#34501 | #34490 |
🧪 Regression Tests to Verify
These tests were added by the overlapping fix PRs. Running them to verify no side-effect regressions:
| Fix PR | Type | Test | Filter |
|---|---|---|---|
| #32916 | UnitTest | Maui13856Tests | Maui13856Tests |
| #32916 | XamlUnitTest | Maui13856 | Maui13856 |
| #33914 | XamlUnitTest | Maui33826Project | Maui33826Project |
| #34727 | XamlUnitTest | Maui34726 | Maui34726 |
| #34501 | UnitTest | BindingDiagnosticsTests | BindingDiagnosticsTests |
| #34501 | XamlUnitTest | Maui34490ViewModel | Maui34490ViewModel |
🧪 Regression Test Results
❌ FAILED — 2 passed, 4 failed, 0 skipped
| Fix PR | Test | Type | Result |
|---|---|---|---|
| #32916 | Maui13856Tests | UnitTest | ✅ PASSED |
| #32916 | Maui13856 | XamlUnitTest | ❌ FAILED |
| #33914 | Maui33826Project | XamlUnitTest | ❌ FAILED |
| #34727 | Maui34726 | XamlUnitTest | ❌ FAILED |
| #34501 | BindingDiagnosticsTests | UnitTest | ✅ PASSED |
| #34501 | Maui34490ViewModel | XamlUnitTest | ❌ FAILED |
📋 Pre-Flight — Context & Validation
Issue: #5696 - Binding converter culture override
PR: #35821 - Add ConverterCulture support to Binding/XAML compiled binding paths
Platforms Affected: Android requested for testing; implementation is shared Controls/XAML/source-generator code affecting all platforms.
Files Changed: 21 implementation/API files, 4 test files
Key Findings
- PR adds explicit
ConverterCulturesupport for runtimeBinding,TypedBindingBase,MultiBinding, XAMLBindingExtension, XamlC, and source-generated compiled bindings. - GitHub CLI is unauthenticated in this environment, so remote PR body/comments/checks could not be fetched directly. Local squashed commit
a1248454f1was used for code context. - Gate result supplied by caller is inconclusive; this phase did not re-run gate verification.
- There are unrelated dirty
.github/scriptsand skill files in the worktree; alternative attempts are isolated outside the main worktree.
Code Review Summary
Verdict: NEEDS_DISCUSSION
Confidence: low
Errors: 0 | Warnings: 1 | Suggestions: 1
Key code review findings:
- ⚠ PR description appears stale if it still claims
MultiBindingis not included; current code addsMultiBinding.ConverterCulture. - ℹ Consider XAML syntax coverage for
MultiBinding.ConverterCulture; current local PR tests coverMultiBindingvia unit tests.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #35821 | Add ConverterCulture properties to runtime binding types and thread the value through XAML/XamlC/sourcegen generated binding creation. |
⚠ INCONCLUSIVE (Gate supplied by caller) | Binding.cs, TypedBinding.cs, MultiBinding.cs, XAML/sourcegen/API/test files |
Original PR |
🔬 Code Review — Deep Analysis
Code Review — PR #35821
Independent Assessment
What this changes: Adds ConverterCulture to Binding, TypedBindingBase, MultiBinding, XAML BindingExtension, XamlC, and source-gen binding paths. Explicit culture is passed to converter Convert/ConvertBack; unset culture remains dynamic via CurrentUICulture.
Inferred motivation: Fix #5696: allow locale override per binding.
Reconciliation with PR Narrative
Author claims: Adds Binding.ConverterCulture; says MultiBinding is intentionally not included.
Agreement/disagreement: Code now adds MultiBinding.ConverterCulture, so the PR description is stale.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
Source-gen per-binding CultureInfoConverter allocation |
inline review | ✅ Fixed | KnownMarkups.cs emits CultureInfo.GetCultureInfo(...). |
| Gate/build inconclusive due XAML MAUIX2017 diagnostics | MauiBot | ❌ Unresolved/External | Current MauiBot review still reports XAML test verification blocked by unrelated existing files. |
Blast Radius Assessment
- Runs for all instances: mostly no; behavior changes only when converters/
ConverterCultureare used, though XamlC emits an extra null setter for compiled bindings. - Startup impact: no direct startup/static initialization impact.
- Static/shared state: no new static state.
CI Status
- Required-check result:
gh pr checks --requiredunavailable (unauthenticated). Public check-runs showmaui-prand Build Analysis failing. - Classification: undetermined / likely unrelated but not proven. Failing leaf is AOT macOS integration tests with unexpected
linker-cache/apply-preserve-attribute.xml, not binding-specific. - Action taken: invoked
azdo-build-investigator;ci-analysisunavailable. Confidence capped low; no LGTM.
Findings
⚠️ Warning — PR description is stale
The PR body says MultiBinding is not included, but the current diff adds MultiBinding.ConverterCulture and public API entries. Update the description before merge.
💡 Suggestion — Add XAML MultiBinding.ConverterCulture coverage
MultiBinding has unit coverage, but no XAML syntax test for setting ConverterCulture on MultiBinding.
Failure-Mode Probing
- Unset culture: remains dynamic (
_converterCulture ?? CurrentUICulture), clone preserves raw null field. - Explicit null: reverts to dynamic default; consistent with property shape.
- Compiled binding without culture: gets a harmless null assignment, then runtime fallback remains unchanged.
Verdict: NEEDS_DISCUSSION
Confidence: low
Summary: Code implementation appears sound, but CI is red/undetermined and prior gate verification remains inconclusive. Also update the stale PR narrative around MultiBinding.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | maui-expert-reviewer | Shared internal BindingBase converter-culture slot with public facades on Binding, TypedBindingBase, and MultiBinding; clones copy the raw nullable slot through one helper. |
⚠ Blocked | 4 files | Core culture unit tests passed (18/18). XAML primary build blocked by existing MAUIX2017 duplicate-content diagnostics after build-task recovery; mandatory regressions not run because primary XAML did not pass. |
| 2 | maui-expert-reviewer | Culture-bound IValueConverter/IMultiValueConverter wrappers that substitute explicit culture while leaving converter call sites on CurrentUICulture. |
⚠ Blocked | 4 files + 1 new helper | Core culture unit tests passed (18/18) after one compile fix. XAML/regression validation blocked by build-task/environment prerequisites. Self-review found wrapper identity/complexity risk. |
| PR | PR #35821 | Separate ConverterCulture fields/properties on Binding, TypedBindingBase, and MultiBinding; direct converter call-site use; XAML/XamlC/sourcegen assignment plumbing. |
⚠ INCONCLUSIVE (Gate supplied by caller) | 25 files | Original PR. Code review found no functional errors; PR narrative may be stale around MultiBinding. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| gpt-5.5 / maui-expert-reviewer | 2 | No | No third meaningfully different approach recommended. Remaining ideas were public BindingBase.ConverterCulture (overexposes API), side-car storage (overhead/complexity), fallback to runtime binding (loses compiled-binding benefits), or helper/interface reshuffles equivalent to the PR. |
Exhausted: Yes
Selected Fix: PR #35821 — The PR's direct per-binding storage and converter call-site plumbing remains the clearest low-risk implementation. Candidate 1 is a plausible refactor but not demonstrably better because full XAML/regression validation was blocked; Candidate 2 is more complex and has compatibility risk.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the current description is stale because it says MultiBinding is intentionally excluded, but the actual diff adds MultiBinding.ConverterCulture support.
Recommended title
Binding: Add ConverterCulture support
Recommended description
### Description
Adds `Binding.ConverterCulture` support for #5696 so bindings can pass an explicit `CultureInfo` to `IValueConverter.Convert` and `ConvertBack` instead of always using `CultureInfo.CurrentUICulture`.
The implementation preserves existing `Binding` constructor signatures and wires the property through runtime bindings, typed bindings, runtime XAML, XamlC, and source-generated XAML. It also adds `MultiBinding.ConverterCulture` so `IMultiValueConverter.Convert` and `ConvertBack` receive the explicit culture when one is set.
Unset `ConverterCulture` remains dynamic: bindings continue to use the current `CultureInfo.CurrentUICulture` unless an explicit culture is assigned. Clone paths preserve explicit cultures without snapshotting the default culture.
This intentionally does not add new `ConverterCulture` APIs to `TemplateBinding`. `TemplateBinding` has no `ConverterCulture` property to propagate.
### Issues Fixed
Fixes #5696
### Testing
- `git diff --check`
- `dotnet build src/Controls/src/Build.Tasks/Controls.Build.Tasks.csproj --no-restore`
- `dotnet build src/Controls/src/SourceGen/Controls.SourceGen.csproj --no-restore`
- `dotnet test src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj --no-restore`
- `dotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --no-restore`
- `LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --no-restore`
- `LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj --no-restore -p:WarningsNotAsErrors=XC0618%3BXC0619%3BXC0022%3BXC0023%3BXC0025%3BXC0045%3BXC0067%3BMAUIG2045%3BMAUID1000%3BMAUIX2005%3BMAUIX2015%3BMAUIX2017`
🏁 Report — Final Recommendation
Comparative Candidate Report
Candidates Compared
| Rank | Candidate | Result | Assessment |
|---|---|---|---|
| 1 | pr |
⚠ Inconclusive validation | Best candidate. The direct per-binding ConverterCulture implementation is straightforward, preserves unset-culture dynamism, covers runtime/XAML/XamlC/sourcegen paths, and expert review found no actionable code issues. |
| 2 | pr-plus-reviewer |
⚠ Inconclusive validation | Functionally identical to pr because the expert reviewer produced no actionable findings. Ranked below pr only because it adds no improvement over the submitted fix. |
| 3 | try-fix-1 |
⚠ Blocked | A reasonable refactor that centralizes converter-culture storage in BindingBase while keeping public facades on derived binding types. Core culture tests passed, but XAML/regression validation was blocked, and the refactor is not demonstrably better than the smaller submitted PR approach. |
| 4 | try-fix-2 |
⚠ Blocked | Core culture tests passed after a compile fix, but the wrapper-converter design is more complex and carries a moderate compatibility risk because internal converter storage no longer directly holds the user converter instance. |
No candidate has a fully passing regression result. The supplied gate is inconclusive and the XAML regression failures in the phase artifacts are not treated as PR-caused code failures because the environment could not reliably build/run the relevant XAML tests. If any candidate had passed the regression tests, it would rank above candidates with failing regression tests per the required ordering rule.
Candidate Details
pr
The submitted PR adds ConverterCulture to Binding, TypedBindingBase, MultiBinding, and BindingExtension, then wires that value through runtime binding, typed binding, XamlC, and source-generated XAML. This is the clearest implementation because converter call sites pass the selected culture directly and no wrapper/side-channel behavior is introduced.
pr-plus-reviewer
The expert reviewer wrote an empty inline findings file ([]) and recommended no patch-level changes. This candidate is therefore identical to pr.
try-fix-1
This candidate centralizes the nullable converter-culture slot in BindingBase and exposes derived public facades. It reduces duplicated backing-field/clone code, but it touches an additional base type and did not complete XAML/regression validation. Since the PR's duplicated state is small and explicit, this refactor is not enough to displace the submitted implementation.
try-fix-2
This candidate wraps converters with culture-bound decorators so existing converter call sites continue to pass CurrentUICulture. The approach is meaningfully different but less desirable: it adds wrapper allocation/identity complexity and had a compile issue during iteration before core tests passed.
Winner
pr is the winning candidate.
The submitted fix is the lowest-risk complete implementation: it is direct, readable, and covers the required runtime and generated binding surfaces. The expert-review-enhanced candidate produced no changes, try-fix-1 is only a refactor without stronger validation, and try-fix-2 is more complex with a compatibility concern.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description
Adds
Binding.ConverterCulturesupport for #5696 so bindings can pass an explicitCultureInfotoIValueConverter.ConvertandConvertBackinstead of always usingCultureInfo.CurrentUICulture.The implementation preserves existing
Bindingconstructor signatures and wires the property through runtime bindings, typed bindings, runtime XAML, XamlC, and source-generated XAML.This intentionally does not add new
ConverterCultureAPIs toMultiBindingorTemplateBinding.MultiBindingparity can be considered separately, andTemplateBindinghas noConverterCultureproperty to propagate.Issues Fixed
Fixes #5696
Testing
git diff --checkdotnet build src/Controls/src/Build.Tasks/Controls.Build.Tasks.csproj --no-restoredotnet build src/Controls/src/SourceGen/Controls.SourceGen.csproj --no-restoredotnet test src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj --no-restoredotnet test src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj --no-restoreLANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --no-restoreLANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj --no-restore -p:WarningsNotAsErrors=XC0618%3BXC0619%3BXC0022%3BXC0023%3BXC0025%3BXC0045%3BXC0067%3BMAUIG2045%3BMAUID1000%3BMAUIX2005%3BMAUIX2015%3BMAUIX2017