feat(comet): upgrade Comet to .NET 11 preview 5#325
Conversation
Bumps Comet's pinned SDK and MAUI version to the preview 5 release (2026-06-09) and scopes the bump to the Comet subtree so the rest of the repo (DevFlow, Linux.Gtk4, Windows.WPF, EssentialsAI, samples) remains on MAUI 10 until those products are migrated separately. Changes (all under src/Comet/): - global.json: SDK 11.0.100-preview.3 → 11.0.100-preview.5.26302.115 - Directory.Build.props: hardcode MauiVersion to 11.0.0-preview.5.26304.4 with a TODO to drop the override when eng/Versions.props goes net11. - sample/CometControlsGallery + sample/CometMacApp csprojs: bump their hardcoded MauiVersion overrides (10.0.31 → preview.5) so the -macos TFM resolves the matching MAUI build. - NuGet.config (new): Comet-scoped nuget.org feed. Comet builds independently within maui-labs and its Debug samples depend on Redth.MauiDevFlow.Agent (per .squad/decisions.md), which is only published on nuget.org — not on any dnceng public feed the repo root NuGet.config restricts itself to. Adding nuget.org here (and only here) keeps the repo-wide dnceng-only policy intact. Verified on macOS / preview 5: - dotnet build src/Comet/src/Comet/Comet.csproj (Debug, net11.0-maccatalyst): 0 errors. - dotnet build sample/Comet.Sample (Debug, net11.0-maccatalyst): 0 errors. - project.assets.json confirms Microsoft.Maui.Controls/11.0.0-preview.5.26304.4 resolves. - Comet.Sample launched on Mac Catalyst, MauiDevFlow agent on port 9223, visible UI, no startup errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expert Code Review — PR #325Methodology: 3 independent reviewers with adversarial consensus Findings: 4 posted as inline comments
Discarded Findings
CI Status
Test CoverageThis PR contains no test changes. As a version-bump PR scoped to build infrastructure and sample projects, no new tests are expected. However, the CI build failure on macOS should be investigated.
|
There was a problem hiding this comment.
Expert Code Review: 4 findings posted inline (1 critical, 1 moderate, 2 minor). See the summary comment for full details.
Generated by Expert Code Review (auto) for issue #325 · ● 7.9M
| <RootNamespace>CometControlsGallery</RootNamespace> | ||
| <UseMaui Condition="!$(TargetFramework.Contains('-macos'))">true</UseMaui> | ||
| <MauiVersion Condition="$(TargetFramework.Contains('-macos')) AND '$(MauiVersion)' == ''">10.0.31</MauiVersion> | ||
| <MauiVersion Condition="$(TargetFramework.Contains('-macos')) AND '$(MauiVersion)' == ''">11.0.0-preview.5.26304.4</MauiVersion> |
There was a problem hiding this comment.
🟢 MINOR · 2/3 consensus
Dead code: MauiVersion condition is unreachable
This condition $(TargetFramework.Contains('-macos')) AND '$(MauiVersion)' == '' can never be true because Directory.Build.props already sets MauiVersion (via its own == '' guard) before this csproj body evaluates. The line is unreachable dead code that may mislead developers during future version bumps.
Recommendation: Remove the line or add a comment noting it's a placeholder for when -macos is re-enabled in <TargetFrameworks>.
| <packageSources> | ||
| <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> |
There was a problem hiding this comment.
🔴 CRITICAL · 3/3 consensus
Supply chain: nuget.org added without packageSourceMapping
This config adds nuget.org to the restore path for the entire src/Comet/ subtree with no <packageSourceMapping>. NuGet resolves packages from the feed offering the highest matching version — any attacker publishing a package with the same ID as a dnceng-hosted package (internal tooling, preview MAUI assets, etc.) and a higher version number would silently win resolution (classic dependency-confusion vector).
Combined with the Version="*" floating reference for Redth.MauiDevFlow.Agent in the samples, this is actively exploitable in Release builds.
Recommendation: Add <packageSourceMapping> to scope nuget.org to only the required package pattern:
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="Redth.MauiDevFlow.*" />
</packageSource>
</packageSourceMapping>| <ApplicationVersion>1</ApplicationVersion> | ||
| <SupportedOSPlatformVersion>14.0</SupportedOSPlatformVersion> | ||
| <MauiVersion>10.0.31</MauiVersion> | ||
| <MauiVersion>11.0.0-preview.5.26304.4</MauiVersion> |
There was a problem hiding this comment.
🟡 MODERATE · 2/3 consensus (confirmed via follow-up)
Silent version freeze on next preview bump
This <MauiVersion> is set unconditionally (no Condition attribute). In MSBuild evaluation order, Directory.Build.props runs first and sets MauiVersion conditionally, then this csproj overwrites it unconditionally. When Directory.Build.props is bumped for preview.6, this project will silently stay on preview.5.
Recommendation: Either remove the inline property and rely on Directory.Build.props, or add a guard condition:
<MauiVersion Condition="'$(MauiVersion)' == ''">11.0.0-preview.5.26304.4</MauiVersion>Note: One reviewer disagreed, arguing the unconditional override is intentional because eng/Versions.props may still carry a MAUI 10 value. If that's the intent, a comment explaining this would prevent future confusion.
| { | ||
| "sdk": { | ||
| "version": "11.0.100-preview.3.26207.106", | ||
| "version": "11.0.100-preview.5.26302.115", |
There was a problem hiding this comment.
🟢 MINOR · 3/3 consensus (confirmed via follow-up)
CI version band drift risk
.github/workflows/ci-comet.yml uses dotnet-version: '11.0.x' + dotnet-quality: 'preview' (floating). This global.json pins 11.0.100-preview.5 with rollForward: latestPatch. When preview.6 ships, CI will install preview.6, but latestPatch won't roll forward across preview bands (preview.5→preview.6 is a feature-band change). Builds will fail with "SDK not found."
Recommendation: Either use global-json-file: src/Comet/global.json in the setup-dotnet action (so the exact pinned version is installed), or change rollForward to latestFeature.
What
Bumps Comet's pinned SDK and MAUI version to the .NET 11 preview 5 release (2026-06-09). The bump is scoped to the Comet subtree only — the rest of maui-labs (DevFlow, Linux.Gtk4, Windows.WPF, EssentialsAI, samples) stays on MAUI 10 until those products migrate separately.
Changes (all under
src/Comet/)global.json11.0.100-preview.3→11.0.100-preview.5.26302.115Directory.Build.propsMauiVersionto11.0.0-preview.5.26304.4(with TODO to drop the override onceeng/Versions.propsmoves to MAUI 11)sample/CometControlsGallery/CometControlsGallery.csproj-macosMauiVersionoverride10.0.31→ preview.5sample/CometMacApp/CometMacApp.csprojMauiVersion10.0.31→ preview.5NuGet.config(new)nuget.orgfeed so Debug samples can restoreRedth.MauiDevFlow.Agent(per.squad/decisions.mdthe team standard) — that package isn't mirrored on any dnceng feed the repo-rootNuGet.configrestricts itself toWhy scope to Comet only
A repo-wide bump of
MicrosoftMauiControlsVersionto preview.5 would break every sibling onnet10.0-*that uses CPM aliases without aVersionOverride— MAUI 11 preview 5 only shipsnet11.0/netstandardlib assets, nonet10.0. Affected projects include the Linux.Gtk4 backend, the Windows.WPF backend, the EssentialsAI samples, the AIExtensions samples, and DevFlow.Sample. Keeping the bump local tosrc/Comet/Directory.Build.propsleaves those net10.0 consumers untouched.The
<Import Project="...eng/Versions.props" />in Comet'sDirectory.Build.propsis preserved so future repo-wideMicrosoftMauiControlsVersionupdates flow through if the override is removed.Verified on macOS / preview 5
dotnet build src/Comet/src/Comet/Comet.csproj(Debug,net11.0-maccatalyst): 0 errors afterrm -rf obj/clean restore.dotnet build sample/Comet.Sample(Debug,net11.0-maccatalyst): 0 errors after clean restore.project.assets.jsonconfirmsMicrosoft.Maui.Controls/11.0.0-preview.5.26304.4resolves (proves the localized version wins, not the repo-wide10.0.41).Follow-ups (not in this PR)
net11.0-macosinsrc/Comet/src/Comet/Comet.csproj(the "workload not yet available" comment is obsolete in preview 5 —microsoft.net.sdk.macosships).eng/Versions.propsis on MAUI 11, drop the override inDirectory.Build.propsper the TODO.