Skip to content

Update CsWin32 and analyzer dependencies while preserving compiler compatibility - #869

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
mainfrom
nmetulev-dependabot-build-failures
Sep 17, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
mainfrom
nmetulev-dependabot-build-failures

Conversation

@nmetulev

Copy link
Copy Markdown
Member

Description

Manually adopt the dependency updates from #855 and #857 with the required CsWin32 API adaptation and compatibility coverage.

Both Dependabot PRs failed to compile because CsWin32 0.3.333 replaces the SHGetImageList convenience overload used by the CLI. Use its typed out IImageList2 overload and strengthen the shell-icon test to verify repeated acquisition and serialization after native handles are released.

Update Microsoft.NET.Test.Sdk to 18.10.0, xunit.v3 and xunit.runner.visualstudio to 4.0.0, Microsoft.CodeAnalysis.Analyzers to 5.9.0, and the test host's Microsoft.CodeAnalysis.CSharp to 5.9.0. Keep the shipped analyzer's Microsoft.CodeAnalysis.CSharp reference at 4.8.0 so older supported compilers can still load it. Add assembly-reference regression tests and exclude that package from automatic Dependabot bumps.

Usage Example

No public commands, flags, configuration formats, or library APIs change. Existing executable-icon extraction continues to work:

winapp manifest generate . --executable .\MyApp.exe

Related Issue

Supersedes #855 and #857. The production Roslyn bump in those PRs is intentionally omitted to preserve the supported compiler baseline.

Type of Change

  • 🐛 Bug fix
  • 🔧 Config/build
  • 🧪 Test update

Checklist

  • Regression tests added and exercised
  • Tested locally on Windows
  • CLI schema and plugin documentation regenerated and validated; no user-facing documentation changes required

Screenshots / Demo

Not applicable: no intended UI or CLI behavior change.

Additional Notes

Validation

Coverage Result
Focused CLI tests: icons, manifest generation, public API surface, real MP4 encoder, recording 77 passed
Full UI Automation library suite 649 passed; 2 opt-in live pointer-injection tests skipped
Analyzer suite on Roslyn 5.9 65 passed
Analyzer suite temporarily run against Roslyn 4.8 65 passed; test dependency restored to 5.9 afterward
Analyzer compatibility negative check Both new tests correctly failed when the production reference was temporarily raised to 5.9; production reference restored to 4.8
Analyzer MSBuild stand-down contract Passed
npm unit tests 307 passed
NuGet package layout and MSBuild contracts 62 passed
scripts\build-cli.ps1 -SkipTests Produced x64/ARM64 NativeAOT binaries, npm package, all four NuGet packages, and both MSIX packages
scripts\validate-llm-docs.ps1 Passed

The build script's test phase was skipped because the dependency-focused suites above were run separately; the full CLI suite was not run.

Published-binary and consumer checks

Tested both published binaries on an ARM64 Windows host: ARM64 natively and x64 under emulation. Both successfully extracted an executable's icon and generated 49 assets, inspected a dedicated test window, round-tripped a text value, captured nonblank screenshots, and recorded six-frame WGC/H.264 videos with JPEG evidence. Checked output dimensions, frame manifests, changing image content, and finalized MP4 sample tables.

Fresh consumers of the packaged net10.0-windows and net10.0-windows10.0.19041.0 library targets restored, compiled with warnings as errors, and ran. The lean target retained GDI-only capture; the full target exposed WGC and recording. CsWin32 was absent from the consumers' transitive dependency graph.

No downstream break was found in these tested paths; x64 hardware execution and opt-in live pointer injection were not covered.

…patibility

Adapt shell icon acquisition to the typed CsWin32 overload, retain the shipped analyzer's Roslyn 4.8 baseline, and add compatibility and icon lifetime regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved blocking issues were identified, and compatibility coverage was added.

Pull request overview

Updates CsWin32 and analyzer/test dependencies while preserving Roslyn 4.8 compatibility for shipped analyzers.

Changes:

  • Adapts shell-icon acquisition to the typed CsWin32 API.
  • Strengthens icon lifetime, serialization, and analyzer compatibility tests.
  • Updates dependency versions and prevents automatic Roslyn baseline bumps.
File summaries
File Description
src/winapp-CLI/WinApp.Cli/Helpers/ShellIcon.cs Uses typed IImageList2 acquisition.
src/winapp-CLI/WinApp.Cli.Tests/ShellIconTests.cs Adds repeated acquisition and serialization coverage.
src/winapp-CLI/Directory.Packages.props Updates CsWin32 and related dependencies.
src/winapp-Analyzer/Microsoft.WindowsAppSDK.Analyzers/Microsoft.WindowsAppSDK.Analyzers.csproj Retains the Roslyn 4.8 analyzer reference.
src/winapp-Analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/Microsoft.WindowsAppSDK.Analyzers.Tests.csproj Updates analyzer test dependencies to Roslyn 5.9.
src/winapp-Analyzer/Microsoft.WindowsAppSDK.Analyzers.Tests/AnalyzerCompatibilityTests.cs Verifies shipped analyzer assembly references.
.github/dependabot.yml Excludes Roslyn compiler references from automatic updates.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Lite (auto)

Note

Copilot is running an experiment and ran this review at Lite.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Build in progress — metrics below are from a previous commit and will update when the current build finishes.

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 56.80 MB 56.81 MB 📈 +4.5 KB (+0.01%)
CLI (x64) 56.85 MB 56.86 MB 📈 +4.0 KB (+0.01%)
MSIX (ARM64) 23.62 MB 23.62 MB 📉 -1.8 KB (-0.01%)
MSIX (x64) 25.06 MB 25.06 MB 📈 +2.6 KB (+0.01%)
NPM Package 49.26 MB 49.26 MB 📈 +4.2 KB (+0.01%)
NuGet Package 49.34 MB 49.35 MB 📈 +6.3 KB (+0.01%)

Test Results

7178 passed, 37 skipped out of 7215 tests in 1429.6s (+321.6s vs. baseline)

Test Coverage

85.9% line coverage, 80% branch coverage · ✅ no change vs. baseline

CLI Startup Time

61ms median (x64, winapp --version) · ✅ no change vs. baseline

Try This Build

Installs the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing.

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 869
Switching between builds often?

Put the tool on your PATH once:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPath

Then this build is just:

winapp-pr 869

Run winapp-pr with no arguments to pick from a list of open PRs.


Updated 2026-09-17 20:54:12 UTC · commit 8ad3416 · workflow run

@azchohfi
Alexandre Zollinger Chohfi (azchohfi) merged commit 2e307c7 into main Sep 17, 2026
31 checks passed
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) deleted the nmetulev-dependabot-build-failures branch September 17, 2026 21:50
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.

3 participants