Skip to content

fix(cli): package games with .NET SDK 11 (runtime pack MSBuild resolved, workloads per SDK) - #153

Merged
NastMz merged 3 commits into
mainfrom
fix/sdk11-runtime-pack
Nov 13, 2026
Merged

NastMz merged 3 commits into
mainfrom
fix/sdk11-runtime-pack

Conversation

@NastMz

@NastMz NastMz commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What and why

GitHub's ubuntu-24.04 image now ships .NET SDK 11.0.100. The SDK's external-project check (sdk/tests/external.mjs) builds outside global.json, so SDK 11 builds the net10.0 game, and four checks failed (run 43279201768, "SDK / External project (Linux)"). This fails on main too.

  • microengine package looked for the wrong runtime pack. It used the SDK's bundled runtime version (BundledNETCoreAppPackageVersion, 11.0.0), but a net10.0 publish under SDK 11 uses the 10.0.x pack, so .../microsoft.netcore.app.runtime.linux-x64/11.0.0/LICENSE.TXT is missing. Every target (desktop, web, Android, iOS) now asks MSBuild which pack the build used (-t:ResolveFrameworkReferences -getItem:ResolvedRuntimePack on the restored project) and copies that pack's licence and notices. build-info.json records that version. The Android host gets the files through a generated Runtime.props, written after a restore.
  • The Android and web failures were a CI mismatch. The workloads step ran inside the repository, where global.json selects SDK 10, while the external project built with SDK 11. Workloads belong to one SDK. The web build only "succeeded" because SDK 10's packs on disk satisfied SDK 11.
  • Decision: the external check keeps building like a developer with the newest SDK, not pinned to the repo's SDK. The external job installs 11.0.x explicitly, so runners don't depend on image rollout timing. The Linux job installs wasm-tools-net10 android from $RUNNER_TEMP. SDK 11 needs wasm-tools-net10 for net10.0 browser builds; wasm-tools serves net11.0 only (seen in SDK 11's manifests and a local NETSDK1147). SDK 10 stays covered by the repository's own package checks.
  • The CLI now tells developers what they need. doctor accepts any SDK from 10 on, and doctor web names the workload that SDK needs. info shows the target framework (net10.0) instead of the SDK's runtime.
  • Docs: getting started, packaging, CLI reference, tutorial pages 12 and 13, the embedding example, release notes (## Next release, Fixed) and docs/releasing.md.

How it was checked

  • dotnet test MicroEngine.slnx -c Release passes. Only tests/MicroEngine.Cli.Tests was run (26 passed, 1 skipped); the full solution was left to CI.
  • Behaviour changes have tests:
    • Unit tests cover resolving the runtime pack, a pack missing its licence files, and the web workload name per SDK.
    • external.mjs now checks each package's runtime against the game's framework and what doctor web reports, and logs the SDK it used.
  • Documentation updated where the change is visible to users
  • sdk/tests/external.mjs on Windows with .NET SDK 11.0.100, against a locally packed feed: all checks passed. The Windows and Linux packages carry runtime 10.0.15, and the web expected failure names wasm-tools-net10. Not run locally: Linux web and Android under SDK 11; this PR's CI is the first run of those.
  • An independent review found no blockers. Three of its advisories are fixed in the second commit; one older issue stays open: Emscripten's licence is picked by name order when two Emscripten versions are installed.

Risk: CI and packaging change (the external job's SDK and workloads, and how every package finds the .NET licence files).

Licence

  • I wrote this change or have the right to submit it, and I license it under the MIT License
    (CONTRIBUTING.md)
  • It adds no code or assets under incompatible terms; new third-party assets are listed in the game's CREDITS.md

🤖 Generated with Claude Code

…'s own

With .NET SDK 11 installed, a net10.0 game is published with a 10.0 runtime
pack, but `microengine package` looked for the licence of the SDK's bundled
runtime (11.0.0) and stopped. Every target now asks MSBuild for the
ResolvedRuntimePack of the publish and copies that pack's licence and notices;
build-info.json records its version. The Android host gets them through a
generated Runtime.props after a restore.

`microengine doctor` accepts any SDK from 10 on and names the browser workload
the SDK in use needs for a .NET 10 game (wasm-tools-net10 with SDK 11);
`microengine info` shows the target framework.

The SDK's external check now installs .NET SDK 11 explicitly and installs the
workloads for that SDK from outside the repository, so the project and its
workloads share one SDK; it records the SDK in use and checks the runtime
each package carries.
…d repair

The external check expects a failed web package only when no browser
runtime pack is on disk, since a newer SDK accepts another SDK's matching
pack as its workload. The embedding page names wasm-tools-net10 for SDK 11.
Firefox 160 (ubuntu-24.04 runner image 20261103.629) fails the check
"fullscreen button and Alt+Enter" with {"on":false,"w":960}. Reproduced
in a container with Firefox 159.0 and 160.0 from ftp.mozilla.org under
xvfb-run and puppeteer-core 25.13.0 (WebDriver BiDi): the button's click
carries user activation (navigator.userActivation.isActive is true) and
calls requestFullscreen(), but on Firefox 160 on a bare Xvfb the promise
never settles and neither fullscreenchange nor fullscreenerror fires,
even after 6 s. Firefox 159 completes the same request on the same
display. With a window manager (Openbox) running on the display, both
versions enter fullscreen; headless Firefox 160 does too. So Firefox 160
on X11 waits for the window manager to make the window fullscreen, and
xvfb-run starts none. The page's fullscreen button is correct: a real
desktop always has a window manager.

The browser engine job installs openbox and the Firefox step starts it
inside xvfb-run before the suites. Chrome's steps are unchanged.
@github-actions

Copy link
Copy Markdown

Preview of 3ba872a (candidates demos): https://micro-engine-77z14atdw-nastmzs-projects.vercel.app

@NastMz
NastMz merged commit de783b7 into main Nov 13, 2026
84 of 86 checks passed
@NastMz
NastMz deleted the fix/sdk11-runtime-pack branch November 13, 2026 02:56

This branch was successfully deployed

1 active deployment
preview — 3ba872a0 Deployed Nov 13, 2026 by NastMz via Site / Deploy preview #409
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