From f179d93906a533934d917d645d9b106af832412d Mon Sep 17 00:00:00 2001 From: Mathijs Beemsterboer <15211332+TheBeems@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:05:41 +0200 Subject: [PATCH 1/2] Fix Store package runtime layout --- CHANGELOG.md | 4 ++++ CodexUsageDock/CodexUsageDock.csproj | 4 ++-- DEVELOPMENT.md | 2 +- scripts/build-release.ps1 | 32 ++++++++++++++-------------- scripts/test-integration.ps1 | 3 +++ 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 073ff75..a3244ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Each entry links to the commit or pull request that introduced the change. ## [Unreleased] +### Fixed + +- Microsoft Store packages now include the complete self-contained .NET application layout, preventing startup failures caused by a missing managed entry assembly. + ## [0.5.1] - 2026-07-16 ### Changed diff --git a/CodexUsageDock/CodexUsageDock.csproj b/CodexUsageDock/CodexUsageDock.csproj index 6d889af..a7faeff 100644 --- a/CodexUsageDock/CodexUsageDock.csproj +++ b/CodexUsageDock/CodexUsageDock.csproj @@ -30,7 +30,6 @@ None false - false true @@ -107,7 +106,8 @@ - true + + false true true diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 85c792a..b12c8da 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -118,7 +118,7 @@ The command builds from an isolated manifest copy with the four-part MSIX versio - publisher `CN=F748B633-A4F0-42F4-B6F1-B5BDCAED8E0C`; - x64 and ARM64 architectures; - the complete generated asset set and its required pixel dimensions; -- app-local .NET runtime files and, when emitted separately from the single-file bundle, self-contained `includedFrameworks` metadata; +- the complete app-local managed application and .NET runtime layout, including self-contained `includedFrameworks` metadata; - packaged COM and `com.microsoft.commandpalette` registrations; - one bundle inside the final `.msixupload`. diff --git a/scripts/build-release.ps1 b/scripts/build-release.ps1 index d2f4983..e5f5efd 100644 --- a/scripts/build-release.ps1 +++ b/scripts/build-release.ps1 @@ -358,6 +358,10 @@ function Assert-SelfContainedMsix { try { $requiredRuntimeEntries = @( 'CodexUsageDock.exe', + 'CodexUsageDock.dll', + 'CodexUsageDock.deps.json', + 'CodexUsageDock.runtimeconfig.json', + 'System.Private.CoreLib.dll', 'coreclr.dll', 'hostfxr.dll', 'hostpolicy.dll' @@ -375,24 +379,20 @@ function Assert-SelfContainedMsix { throw "MSIX is missing required Microsoft Store assets: $($missingAssetEntries -join ', ')." } - # A self-contained single-file publish embeds runtimeconfig.json in the app bundle. - # If the SDK emits it as a loose file, validate that it still declares the included runtime. $runtimeConfigEntry = $archive.GetEntry('CodexUsageDock.runtimeconfig.json') - if ($runtimeConfigEntry) { - $reader = [IO.StreamReader]::new($runtimeConfigEntry.Open()) - try { - $runtimeConfig = $reader.ReadToEnd() | ConvertFrom-Json - } - finally { - $reader.Dispose() - } + $reader = [IO.StreamReader]::new($runtimeConfigEntry.Open()) + try { + $runtimeConfig = $reader.ReadToEnd() | ConvertFrom-Json + } + finally { + $reader.Dispose() + } - $includedFramework = @($runtimeConfig.runtimeOptions.includedFrameworks) | - Where-Object { $_.name -eq 'Microsoft.NETCore.App' } | - Select-Object -First 1 - if (-not $includedFramework) { - throw 'MSIX runtimeconfig is framework-dependent; expected an included Microsoft.NETCore.App framework.' - } + $includedFramework = @($runtimeConfig.runtimeOptions.includedFrameworks) | + Where-Object { $_.name -eq 'Microsoft.NETCore.App' } | + Select-Object -First 1 + if (-not $includedFramework) { + throw 'MSIX runtimeconfig is framework-dependent; expected an included Microsoft.NETCore.App framework.' } } finally { diff --git a/scripts/test-integration.ps1 b/scripts/test-integration.ps1 index 1ede091..d9f10de 100644 --- a/scripts/test-integration.ps1 +++ b/scripts/test-integration.ps1 @@ -352,7 +352,10 @@ else { } $requiredRuntimeFiles = @( + 'CodexUsageDock.dll' + 'CodexUsageDock.deps.json' 'CodexUsageDock.runtimeconfig.json' + 'System.Private.CoreLib.dll' 'coreclr.dll' 'hostfxr.dll' 'hostpolicy.dll' From 9bcc0a3750781ad8c10715951597677506f98e87 Mon Sep 17 00:00:00 2001 From: Mathijs Beemsterboer <15211332+TheBeems@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:06:43 +0200 Subject: [PATCH 2/2] Link Store package fix changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3244ce..10c427e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Each entry links to the commit or pull request that introduced the change. ### Fixed -- Microsoft Store packages now include the complete self-contained .NET application layout, preventing startup failures caused by a missing managed entry assembly. +- Microsoft Store packages now include the complete self-contained .NET application layout, preventing startup failures caused by a missing managed entry assembly. ([PR #11](https://github.com/TheBeems/CodexUsageDock/pull/11)) ## [0.5.1] - 2026-07-16