From ac74a3d6811ec051e5b2bd3a5dcf0ac54c60be84 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2026 17:45:03 -0800 Subject: [PATCH 1/6] Update tooling submodule to main (.NET 10 alignment) Points tooling at CommunityToolkit/Tooling-Windows-Submodule main (c001882), which includes #327. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 138b7742..c0018820 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 138b77424b3db9e4c223917477b965c7db66f862 +Subproject commit c0018820c570e14b7ea0d7ae86fcd57a88277989 From ab8c929ab71e1a874b4a580dc12e25975e211498 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2026 17:47:56 -0800 Subject: [PATCH 2/6] Align modern .NET projects and CI on net10.0 - Retarget the sample index exporter and its tests to net10.0. - Update the generator test path in CI (bin/Release/net10.0) and the SDK used by jobs that cannot read global.json. - Update docs that referenced the .NET 9 SDK and the DOTNET_ROLL_FORWARD workaround, no longer needed now that the exporter targets the SDK's major version. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/instructions/components.instructions.md | 1 - .github/workflows/build.yml | 4 ++-- ReadMe.md | 2 +- .../SampleIndexExporter.Tests.csproj | 2 +- tools/SampleIndexExporter/SampleIndexExporter.csproj | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/instructions/components.instructions.md b/.github/instructions/components.instructions.md index 0de2cb28..ebf23c8b 100644 --- a/.github/instructions/components.instructions.md +++ b/.github/instructions/components.instructions.md @@ -15,7 +15,6 @@ applyTo: "components/**,catalog/**,tools/**" - Run `check` and the tests on a tree without sample build output: building a sample project copies its `*.md`/`*.xaml.cs` into `components/*/samples/bin`, which the exporter does not exclude, so both then fail with "sample id ... is already declared". Delete that output first (see the validation skill's clean-up). - `dotnet test tools/SampleIndexExporter.Tests` (also run by CI) is stricter than `check`: it also fails on unreferenced `[ToolkitSample]`s, withheld samples and sample-less docs missing from its allow-list (`CoverageTests`). - An entry id is the slug of the *markdown file name*, must be unique across all components (a collision is an error) and is published as a stable id: renaming a docs file changes it. -- The exporter and its tests target a runtime older than the SDK in `global.json`. If it is not installed, set `$env:DOTNET_ROLL_FORWARD='Major'` (persists for the session) before `dotnet run`/`dotnet test`. ## `tools/` - The CI job for `tools/` does not check out `tooling/` or install workloads, so these projects must not reference `tooling/` or WinUI/Uno. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a4b21e5..f8a6efe4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: merge_group: env: - DOTNET_VERSION: '9.0.310' # Only used by jobs that cannot access global.json (no checkout/artifact-only jobs) + DOTNET_VERSION: '10.0.402' # Only used by jobs that cannot access global.json (no checkout/artifact-only jobs) ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 @@ -193,7 +193,7 @@ jobs: - name: Run SourceGenerators tests id: test-generator - run: vstest.console.exe ./tooling/CommunityToolkit.Tooling.SampleGen.Tests/bin/Release/net8.0/CommunityToolkit.Tooling.SampleGen.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx" + run: vstest.console.exe ./tooling/CommunityToolkit.Tooling.SampleGen.Tests/bin/Release/net10.0/CommunityToolkit.Tooling.SampleGen.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx" - name: Start Procdump monitoring for first-chance exceptions if: ${{ (matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk') && env.ENABLE_DIAGNOSTICS == 'true' }} diff --git a/ReadMe.md b/ReadMe.md index 466a6ca4..632d0c1b 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -66,7 +66,7 @@ git clone --recurse-submodules https://github.com/CommunityToolkit/Windows.git ### 3. Run build scripts & open solution - Run `dotnet tool restore` from the project root to install the .NET tools used by the build scripts -- Run `tooling\GenerateAllSolution.ps1` from the project root to generate `CommunityToolkit.AllComponents.slnx` (opening `.slnx` files requires Visual Studio 2022 17.13 or later, or the .NET 9 SDK or later) +- Run `tooling\GenerateAllSolution.ps1` from the project root to generate `CommunityToolkit.AllComponents.slnx` (opening `.slnx` files requires Visual Studio 2022 17.13 or later, or the .NET 10 SDK) - Run build scripts from the [Developer Command Prompt for Visual Studio](https://learn.microsoft.com/visualstudio/ide/reference/command-prompt-powershell) or from elsewhere after adding `MSBuild.exe` to your PATH diff --git a/tools/SampleIndexExporter.Tests/SampleIndexExporter.Tests.csproj b/tools/SampleIndexExporter.Tests/SampleIndexExporter.Tests.csproj index ee68e390..f4faf86a 100644 --- a/tools/SampleIndexExporter.Tests/SampleIndexExporter.Tests.csproj +++ b/tools/SampleIndexExporter.Tests/SampleIndexExporter.Tests.csproj @@ -2,7 +2,7 @@ - net9.0 + net10.0 CommunityToolkit.SampleIndex.Tests CommunityToolkit.SampleIndexExporter.Tests enable diff --git a/tools/SampleIndexExporter/SampleIndexExporter.csproj b/tools/SampleIndexExporter/SampleIndexExporter.csproj index 7439ee2e..739bfc0a 100644 --- a/tools/SampleIndexExporter/SampleIndexExporter.csproj +++ b/tools/SampleIndexExporter/SampleIndexExporter.csproj @@ -8,7 +8,7 @@ never loads WinUI. Keeping it platform-agnostic means the staleness check can run as a fast standalone CI job instead of waiting on the Uno/WinUI build matrix. --> - net9.0 + net10.0 CommunityToolkit.SampleIndex CommunityToolkit.SampleIndexExporter enable From d8f870fe32c400ef0369fa4bf93a9b85df075f5b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2026 17:55:04 -0800 Subject: [PATCH 3/6] Use in-box ArgumentNullException.ThrowIfNull Remove the internal default(ArgumentNullException).ThrowIfNull helper, which existed to provide CallerArgumentExpression-based null checks on older targets. Everything now targets net10.0, so the BCL API can be used directly. Animations no longer needs Extensions' internals, so drop its InternalsVisibleTo (Media still uses the shared resource helpers). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Abstract/Animation{TValue,TKeyFrame}.cs | 2 +- .../CustomAnimation{TValue,TKeyFrame}.cs | 2 +- .../ImplicitAnimation{TValue,TKeyFrame}.cs | 2 +- .../src/ArgumentNullExceptionExtensions.cs | 65 ------------------- .../CommunityToolkit.WinUI.Extensions.csproj | 3 +- .../src/Markup/FontIconExtension.cs | 2 +- .../Extensions/ImageSourceExtension.cs | 2 +- .../Effects/Extensions/TileSourceExtension.cs | 2 +- .../src/Helpers/SurfaceLoader.Instance.cs | 6 +- 9 files changed, 10 insertions(+), 76 deletions(-) delete mode 100644 components/Extensions/src/ArgumentNullExceptionExtensions.cs diff --git a/components/Animations/src/Xaml/Abstract/Animation{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/Animation{TValue,TKeyFrame}.cs index cc98af6e..611042b1 100644 --- a/components/Animations/src/Xaml/Abstract/Animation{TValue,TKeyFrame}.cs +++ b/components/Animations/src/Xaml/Abstract/Animation{TValue,TKeyFrame}.cs @@ -91,7 +91,7 @@ public IList> KeyFrames /// public override AnimationBuilder AppendToBuilder(AnimationBuilder builder, TimeSpan? delayHint, TimeSpan? durationHint, EasingType? easingTypeHint, EasingMode? easingModeHint) { - default(ArgumentNullException).ThrowIfNull(ExplicitTarget); + ArgumentNullException.ThrowIfNull(ExplicitTarget); return builder.NormalizedKeyFrames This, EasingType? EasingTypeHint, EasingMode? EasingModeHint)>( property: ExplicitTarget, diff --git a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs index 201a8865..74f9028c 100644 --- a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs +++ b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs @@ -43,7 +43,7 @@ public abstract class CustomAnimation : ImplicitAnimation public override AnimationBuilder AppendToBuilder(AnimationBuilder builder, TimeSpan? delayHint, TimeSpan? durationHint, EasingType? easingTypeHint, EasingMode? easingModeHint) { - default(ArgumentNullException).ThrowIfNull(ExplicitTarget); + ArgumentNullException.ThrowIfNull(ExplicitTarget); return builder.NormalizedKeyFrames This, EasingType? EasingTypeHint, EasingMode? EasingModeHint)>( property: ExplicitTarget, diff --git a/components/Animations/src/Xaml/Abstract/ImplicitAnimation{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/ImplicitAnimation{TValue,TKeyFrame}.cs index f5c1fb77..7ae8ce47 100644 --- a/components/Animations/src/Xaml/Abstract/ImplicitAnimation{TValue,TKeyFrame}.cs +++ b/components/Animations/src/Xaml/Abstract/ImplicitAnimation{TValue,TKeyFrame}.cs @@ -46,7 +46,7 @@ protected ImplicitAnimation() /// public CompositionAnimation GetAnimation(UIElement element, out string? target) { - default(ArgumentNullException).ThrowIfNull(ExplicitTarget); + ArgumentNullException.ThrowIfNull(ExplicitTarget); NormalizedKeyFrameAnimationBuilder.Composition builder = new( ExplicitTarget, diff --git a/components/Extensions/src/ArgumentNullExceptionExtensions.cs b/components/Extensions/src/ArgumentNullExceptionExtensions.cs deleted file mode 100644 index 545654bf..00000000 --- a/components/Extensions/src/ArgumentNullExceptionExtensions.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; - -namespace System; - -/// -/// Throw helper extensions for . -/// -internal static class ArgumentNullExceptionExtensions -{ - /// - /// Throws an for a given parameter name. - /// - /// Dummy value to invoke the extension upon (always pass . - /// The name of the parameter to report in the exception. - /// Thrown with . - [DoesNotReturn] - public static void Throw(this ArgumentNullException? _, string? parameterName) - { - throw new ArgumentNullException(parameterName); - } - - /// - /// Throws an if is . - /// - /// Dummy value to invoke the extension upon (always pass . - /// The reference type argument to validate as non-. - /// The name of the parameter with which corresponds. - /// Thrown if is . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ThrowIfNull(this ArgumentNullException? _, [NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? parameterName = null) - { - if (argument is null) - { - Throw(parameterName); - } - } - - /// - /// Throws an if is . - /// - /// Dummy value to invoke the extension upon (always pass . - /// The pointer argument to validate as non-. - /// The name of the parameter with which corresponds. - /// Thrown if is . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void ThrowIfNull(this ArgumentNullException? _, [NotNull] void* argument, [CallerArgumentExpression(nameof(argument))] string? parameterName = null) - { - if (argument is null) - { - Throw(parameterName); - } - } - - /// - [DoesNotReturn] - private static void Throw(string? parameterName) - { - throw new ArgumentNullException(parameterName); - } -} diff --git a/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj b/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj index d233d2c6..c9c9d0b5 100644 --- a/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj +++ b/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj @@ -25,8 +25,7 @@ - - + diff --git a/components/Extensions/src/Markup/FontIconExtension.cs b/components/Extensions/src/Markup/FontIconExtension.cs index 98704666..5c8faacb 100644 --- a/components/Extensions/src/Markup/FontIconExtension.cs +++ b/components/Extensions/src/Markup/FontIconExtension.cs @@ -23,7 +23,7 @@ public partial class FontIconExtension : TextIconExtension /// protected override object ProvideValue() { - default(ArgumentNullException).ThrowIfNull(Glyph); + ArgumentNullException.ThrowIfNull(Glyph); var fontIcon = new FontIcon { diff --git a/components/Media/src/Effects/Extensions/ImageSourceExtension.cs b/components/Media/src/Effects/Extensions/ImageSourceExtension.cs index 011a5caf..55314fd2 100644 --- a/components/Media/src/Effects/Extensions/ImageSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/ImageSourceExtension.cs @@ -14,7 +14,7 @@ public sealed partial class ImageSourceExtension : ImageSourceBaseExtension /// protected override object ProvideValue() { - default(ArgumentNullException).ThrowIfNull(Uri); + ArgumentNullException.ThrowIfNull(Uri); return PipelineBuilder.FromImage(Uri, DpiMode, CacheMode); } } diff --git a/components/Media/src/Effects/Extensions/TileSourceExtension.cs b/components/Media/src/Effects/Extensions/TileSourceExtension.cs index 95269f68..bb7f78ea 100644 --- a/components/Media/src/Effects/Extensions/TileSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/TileSourceExtension.cs @@ -15,7 +15,7 @@ public sealed partial class TileSourceExtension : ImageSourceBaseExtension /// protected override object ProvideValue() { - default(ArgumentNullException).ThrowIfNull(Uri); + ArgumentNullException.ThrowIfNull(Uri); return PipelineBuilder.FromTiles(Uri, DpiMode, CacheMode); } } diff --git a/components/Media/src/Helpers/SurfaceLoader.Instance.cs b/components/Media/src/Helpers/SurfaceLoader.Instance.cs index d480c46c..c6aa23f3 100644 --- a/components/Media/src/Helpers/SurfaceLoader.Instance.cs +++ b/components/Media/src/Helpers/SurfaceLoader.Instance.cs @@ -155,7 +155,7 @@ public async Task LoadFromUri(Uri uri) /// public async Task LoadFromUri(Uri uri, Size sizeTarget) { - default(ArgumentNullException).ThrowIfNull(compositionDevice); + ArgumentNullException.ThrowIfNull(compositionDevice); var bitmap = await CanvasBitmap.LoadAsync(canvasDevice, uri); var sizeSource = bitmap.Size; @@ -190,7 +190,7 @@ public async Task LoadFromUri(Uri uri, Size sizeTarge /// public CompositionDrawingSurface LoadText(string text, Size sizeTarget, CanvasTextFormat textFormat, Color textColor, Color bgColor) { - default(ArgumentNullException).ThrowIfNull(compositionDevice); + ArgumentNullException.ThrowIfNull(compositionDevice); var surface = compositionDevice.CreateDrawingSurface( sizeTarget, @@ -215,7 +215,7 @@ public CompositionDrawingSurface LoadText(string text, Size sizeTarget, CanvasTe /// public async Task LoadFromUri(Uri uri, Size sizeTarget, LoadTimeEffectHandler loadEffectHandler) { - default(ArgumentNullException).ThrowIfNull(compositionDevice); + ArgumentNullException.ThrowIfNull(compositionDevice); if (loadEffectHandler != null) { From 2ac9b74a5e0f0f6ec43ac041cbc0bf355eca3503 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2026 17:57:07 -0800 Subject: [PATCH 4/6] Remove explicit Microsoft.SourceLink.GitHub reference SourceLink for GitHub is bundled in the .NET SDK (since .NET 8), so the explicit Release-only PackageReference is redundant. Verified that the packed Extensions assembly still gets the same SourceLink document mappings and the nuspec the same repository commit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Build.targets | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 504ca9c9..18bac4bf 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,8 +1,4 @@ - - - - $(CommonTags);UWP;WinUI;Platform;WindowsAppSDK;WASDK;WinAppSDK;Universal $(CommonTags);Uno From 44cc416cd9757c1367ca8360ef8a1f5386412f27 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 3 Dec 2026 17:59:03 -0800 Subject: [PATCH 5/6] Update CI, devcontainer and docs for .NET 10 / Visual Studio 2026 - Require MSBuild from Visual Studio 2026 (18.x) in CI: net10.0 targets are not supported by Visual Studio 2022 (NETSDK1233 is an error with warnings as errors). - Move the devcontainer to the .NET 10 image (global.json requires the 10.0 SDK). Not tested, no Docker available. - Refresh ReadMe prerequisites (Visual Studio 2026, .NET 10 SDK, Windows SDK 26100) and drop the 'ReadMe is out of date' note from the validation skill. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 4 ---- .github/skills/validate-component-changes/SKILL.md | 2 +- .github/workflows/build.yml | 4 ++-- ReadMe.md | 6 +++--- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6935449f..4afefc90 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0 +FROM mcr.microsoft.com/devcontainers/dotnet:10.0 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index da7c1a47..040cb75f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,10 +5,6 @@ "build": { "dockerfile": "Dockerfile", "args": { - // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 - // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "9.0", - // Options "NODE_VERSION": "lts/*" } }, diff --git a/.github/skills/validate-component-changes/SKILL.md b/.github/skills/validate-component-changes/SKILL.md index a3e862a9..7fb46cce 100644 --- a/.github/skills/validate-component-changes/SKILL.md +++ b/.github/skills/validate-component-changes/SKILL.md @@ -9,7 +9,7 @@ Mirrors `.github/workflows/build.yml`; run from the repo root on Windows. Read ` ## Prerequisites - `msbuild.exe` from Visual Studio on `PATH` (Developer shell, or prepend `\MSBuild\Current\Bin\amd64`); otherwise `GenerateSingleSolution.ps1` waits for a keypress. `vstest.console.exe` lives in `\Common7\IDE\CommonExtensions\Microsoft\TestWindow`. -- `dotnet tool restore` once. Build requirements are in `tooling/ReadMe.md` (the root `ReadMe.md` is out of date); CI runs `uno-check` for every leg except `wasdk`, `wpf` and `linuxgtk`. +- `dotnet tool restore` once. Build requirements are in `ReadMe.md` and `tooling/ReadMe.md`; CI runs `uno-check` for every leg except `wasdk`, `wpf` and `linuxgtk`. - If nuget.org is unreachable, restore fails; revert any local feed override in `nuget.config` before committing. ## 1. Fast loop: one component diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8a6efe4..c138ee02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,7 +170,7 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 with: - vs-version: '[17.13,)' + vs-version: '[18.0,)' # Generate full solution with all projects (sample gallery heads, components, tests) - name: Generate solution with ${{ matrix.multitarget }} gallery, components and tests @@ -313,7 +313,7 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 with: - vs-version: '[17.13,)' + vs-version: '[18.0,)' # Build and pack component nupkg (WinUI 2 only builds uwp, WinUI 3 builds wasdk and all Uno targets) - name: Build and pack component packages diff --git a/ReadMe.md b/ReadMe.md index 632d0c1b..64324135 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -48,12 +48,12 @@ Building something cool? Want to engage with other developers? Want to contribut ### 1. Set up the environment > [!NOTE] -> The Windows Community Toolkit requires [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or later to build and Windows 10 or later to execute. If you're building an app with WinUI and Windows App SDK for the first time, follow these [installation instructions](https://learn.microsoft.com/windows/apps/get-started/start-here). +> The Windows Community Toolkit requires [Visual Studio 2026](https://visualstudio.microsoft.com/vs/) or later and the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) (version specified in `global.json`) to build and Windows 10 or later to execute. If you're building an app with WinUI and Windows App SDK for the first time, follow these [installation instructions](https://learn.microsoft.com/windows/apps/get-started/start-here). **Required [Visual Studio components](https://learn.microsoft.com/windows/apps/get-started/start-here?tabs=vs-2022-17-10#required-workloads-and-components):** - Windows application development - .NET desktop development -- Windows 10 SDK, version 2004 (10.0.19041.0) +- Windows SDK 26100 (10.0.26100.0) - Windows 10 21H1 (Build 19043) or greater ### 2. Clone the repository @@ -66,7 +66,7 @@ git clone --recurse-submodules https://github.com/CommunityToolkit/Windows.git ### 3. Run build scripts & open solution - Run `dotnet tool restore` from the project root to install the .NET tools used by the build scripts -- Run `tooling\GenerateAllSolution.ps1` from the project root to generate `CommunityToolkit.AllComponents.slnx` (opening `.slnx` files requires Visual Studio 2022 17.13 or later, or the .NET 10 SDK) +- Run `tooling\GenerateAllSolution.ps1` from the project root to generate `CommunityToolkit.AllComponents.slnx` (opening `.slnx` files requires Visual Studio 2026 or the .NET 10 SDK) - Run build scripts from the [Developer Command Prompt for Visual Studio](https://learn.microsoft.com/visualstudio/ide/reference/command-prompt-powershell) or from elsewhere after adding `MSBuild.exe` to your PATH From 4455c54b9febd8eb13cd96cd373df55bda133032 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 4 Dec 2026 10:55:40 -0800 Subject: [PATCH 6/6] Suppress IL2026 in Behaviors/SettingsControls samples on iOS and Mac Catalyst The net10 iOS/Mac Catalyst SDKs always enable the trim analyzer (Xamarin.Shared.Sdk.Trimming.props), including for class libraries. Uno-generated XAML code for samples using Microsoft.Xaml.Interactivity behaviors/actions (RequiresUnreferencedCode) then raises IL2026, which is an error in Release. This is the same suppression tooling's Uno heads already use. Remove once Uno fixes the generated code. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- components/Behaviors/samples/Behaviors.Samples.csproj | 9 +++++++++ .../samples/SettingsControls.Samples.csproj | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/components/Behaviors/samples/Behaviors.Samples.csproj b/components/Behaviors/samples/Behaviors.Samples.csproj index 54c8f0b2..d2742886 100644 --- a/components/Behaviors/samples/Behaviors.Samples.csproj +++ b/components/Behaviors/samples/Behaviors.Samples.csproj @@ -8,6 +8,15 @@ + + + $(NoWarn);IL2026 + + diff --git a/components/SettingsControls/samples/SettingsControls.Samples.csproj b/components/SettingsControls/samples/SettingsControls.Samples.csproj index de0e51d9..3fb442e3 100644 --- a/components/SettingsControls/samples/SettingsControls.Samples.csproj +++ b/components/SettingsControls/samples/SettingsControls.Samples.csproj @@ -9,6 +9,15 @@ + + + $(NoWarn);IL2026 + +