Skip to content

Reconcile stable sample changes into main - #665

Open
shisan (qiutongMS) wants to merge 7 commits into
mainfrom
integration/main-cpm
Open

Reconcile stable sample changes into main#665
shisan (qiutongMS) wants to merge 7 commits into
mainfrom
integration/main-cpm

Conversation

@qiutongMS

@qiutongMS shisan (qiutongMS) commented Sep 1, 2026

Copy link
Copy Markdown

Purpose

release/2.0-stable contains established sample changes that are still missing from main. This PR incrementally reconciles those changes into main.

This is not a wholesale branch merge, and CPM is only the first part of the reconciliation. Each commit represents one independently reviewable and validated reconciliation step. A step may contain several straightforward samples when they share the same operation, while complex sample families remain separate commits. Every completed commit records what changed and the corresponding evidence on release/2.0-stable.

Reconciled commits

ba853167 — Adopt stable branch central package management

What changed

  • Added the root CPM graph and centralized managed, packaging, and native package versions.
  • Converted all 45 native projects from generated NuGet imports and packages.config to direct PackageReference.
  • Preserved the scoped WindowsML graph and explicit version exceptions.
  • Updated Win2D to the PackageReference-compatible 1.3.2 baseline.
  • Applied ReferenceOutputAssembly=false to native WAP project references.
  • Changed UpdateVersions.ps1 to update every matching declaration across all repository Directory.Packages.props files and fail if stale resolved dependency versions remain.

Stable evidence

Main adaptation

Versions already present on main remain the baseline where the branches differ. SecureUI exists only on main, so its retained native project applies the same CPM and WAP integration pattern used by the stable Windowing sample.

0212804f — Move DynamicDependencies under Samples

What changed

  • Moved DynamicDependenciesSample to Samples/DynamicDependenciesSample.
  • Removed its temporary standalone Directory.Packages.props.
  • Made the sample inherit the root CPM graph and standard Samples build settings.

Stable evidence

3d6270a3 — Port stable fixes to existing samples

What changed

  • Applied the established C4100 unused-parameter fixes to AppLifecycle, Notifications Push, PhotoEditor, TextRendering, and Widgets.
  • Added the WIL C++/WinRT support include required by the Insights native PackageReference conversion.
  • Kept the change source-only and preserved the newer main Push notification ObjectId guidance.

Stable evidence

0a81c45b — Import established stable samples

What changed

  • Imported the stable BackgroundTask, CameraCaptureUI, OAuth2Manager, Badge notification, StoragePickers, Unpackaged WinForms, DrawingIsland, and UXFrameworksOnIslands samples.
  • Added 20 projects across 15 solutions while retaining their established sample behavior.
  • Connected every imported project to the root CPM graph, added the two DrawingIsland Lottie package versions, and applied the existing VS 2026 v145 / VS 2022 v143 selection pattern to imported native projects.
  • Added sample discoverability and feature-specific CI wiring.

Stable evidence

a9e12a71 — Align stable sample packaging

What changed

  • Converted the ResourceManagement and Windowing C++ WinUI samples from separate WAP projects to the stable single-project MSIX layout.
  • Moved byte-identical manifests and package assets into the application projects.
  • Removed the redundant packaging projects and updated the solutions.
  • Preserved all sample source behavior, including the newer native Windowing DispatcherQueue and AppWindow implementation on main.

Stable evidence

a46feef3 — Reconcile Windows AI Foundry samples

What changed

  • Imported the established C++ CMake sparse, MAUI, packaged and sparse WinForms, and packaged, .NET, and sparse WPF variants.
  • Reconciled the existing WinUI gallery with Image Object Remover plus the stable Language Model adapter, embedding, and content-filter behavior.
  • Kept the stable gallery surface and excluded the separate experimental extension-project architecture.
  • Connected every MSBuild project to the root CPM graph, including central MAUI 8.0.100 and Logging.Debug 8.0.1 versions, while retaining the CMake sample's independently documented Windows App SDK 2.1.3 vcpkg graph.

Stable evidence

  • Complete public Windows AI sample refresh: #539 / 08b6f95d on release/2.0-stable
  • CMake sample restoration: #474 / 1b5c3142 on release/2.0-stable
  • .NET 8 update: #574 / 2cbefb54 on release/2.0-stable
  • Language Model adapter sample: #638 / f4876c92 on release/2.0-stable

Main adaptation

The imported MSBuild projects now participate in main's root CPM graph. The MAUI workload's former inline versions were centralized because NuGet rejects them under CPM; the CMake sample remains on its stable, self-contained vcpkg dependency graph rather than introducing the deferred root-to-CMake version bridge.

c0bef5c8 — Reconcile WindowsML samples

What changed

  • Restored the established CppConsoleDll, CppResnetBuildDemo, and ResnetBuildDemoCS samples and added them to the consolidated WindowsML solution and sample index.
  • Retained the SqueezeNet model license required by the Python sample.
  • Aligned the Python installer and documentation with the existing stable 2.1.3 dependency pins and removed the obsolete prerelease/nightly installation path.
  • Preserved the newer main execution-provider, performance, model-catalog, diagnostics, cpp-abi, and WinMLEpCatalog work.

Stable evidence

  • Initial WindowsML sample import: #485 / a08ec174 on release/2.0-stable
  • ResNet projection consolidation and warning fixes: #534 and #535 / d523b8de on release/2.0-stable
  • Python sample refactoring: #578 and #610 / 1a3488a3 on release/2.0-stable
  • Native compiler and linker mitigations: #577, #599, and #652 / 5327f5c4 on release/2.0-stable

Main adaptation

The imported native projects use the current v145 toolset and inherit main's WindowsML security settings. Because main isolates native outputs per project, ConsoleClient explicitly copies WindowsMLWrapper into its output directory; the scoped WindowsML CPM graph and all newer provider/readiness behavior remain unchanged.

Validation

  • Aggregator build 156378056 completed the sample builds but exposed a CPM integration gap in the Aggregator-side version update script: feature-scoped scans do not reach the ancestor Samples/Directory.Packages.props. The ARM64 packaged-app launch tests consequently retained the checked-in 2.4.0 runtime dependency and failed with 0x80073CF3. This run is not counted as passing validation; it must be rerun after the Aggregator updater handles root CPM.

@qiutongMS
shisan (qiutongMS) force-pushed the integration/main-cpm branch 3 times, most recently from b5e19a0 to b05b442 Compare September 2, 2026 03:32
@qiutongMS shisan (qiutongMS) changed the title Centralize NuGet package versions for stable samples Align stable sample dependency management and layout Sep 2, 2026
@qiutongMS shisan (qiutongMS) changed the title Align stable sample dependency management and layout Reconcile stable sample changes into main Sep 2, 2026
Qiutong Shen (from Dev Box) and others added 2 commits September 2, 2026 13:30
Project the centralized NuGet package management model established on release/2.0-stable by PR #590 onto the current main sample set and package baselines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match the sample layout established on release/2.0-stable by PR #590 and inherit the root Samples package graph instead of maintaining a separate dependency boundary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Qiutong Shen (from Dev Box) and others added 5 commits September 2, 2026 14:28
Bring the established release/2.0-stable source fixes into the retained main samples. Resolve the C4100 warnings covered by PR #513, preserve the newer Push notification ObjectId guidance, and add the WIL C++/WinRT support include required by the stable Insights CPM conversion in PR #590.

Stable evidence: PR #513 / 081a0f4 and PR #590 / f933100.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bring the straightforward release/2.0-stable sample set into main in one reconciliation step: BackgroundTask, CameraCaptureUI, OAuth2Manager, Badge notifications, StoragePickers, Unpackaged WinForms, DrawingIsland, and UXFrameworksOnIslands.

Keep the stable sample behavior while adapting package references, native toolsets, documentation, and CI wiring to the current main infrastructure.

Stable evidence: PRs #367, #392, #395, #398, #400, #402, #403, #405, #413, #421, #422, #427, #455, #512, and #590.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopt the release/2.0-stable single-project MSIX layout for the ResourceManagement and Windowing C++ WinUI samples. Move byte-identical package assets and manifests into the application projects, remove the redundant WAP projects, and keep all sample source behavior unchanged.

Stable evidence: PR #590 / f933100 on release/2.0-stable.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant