Updated to .Net 10, and enabled native aot/single file. - #133
Merged
Conversation
Alexandre Zollinger Chohfi (azchohfi)
force-pushed
the
alzollin/net10
branch
from
February 19, 2026 00:03
2ffa30c to
cb3e78e
Compare
Alexandre Zollinger Chohfi (azchohfi)
force-pushed
the
alzollin/net10
branch
from
February 19, 2026 00:35
cb3e78e to
a5037c8
Compare
Alexandre Zollinger Chohfi (azchohfi)
force-pushed
the
alzollin/net10
branch
3 times, most recently
from
February 19, 2026 18:04
2f6e2ca to
c4b35b0
Compare
Alexandre Zollinger Chohfi (azchohfi)
force-pushed
the
alzollin/net10
branch
from
February 19, 2026 18:09
c4b35b0 to
db2a8f3
Compare
Alexandre Zollinger Chohfi (azchohfi)
force-pushed
the
alzollin/net10
branch
from
February 19, 2026 18:21
3250b02 to
2a139d6
Compare
knangunu
approved these changes
Feb 20, 2026
knangunu
reviewed
Feb 20, 2026
- Identity: Microsoft.Identity.Client / .Broker / .Extensions.Msal 4.85.2 -> 4.86.1 - Extensions: Microsoft.Extensions.* 10.0.9 -> 10.0.10 - SkiaSharp (+ NativeAssets.Linux/macOS) 4.148.0 -> 4.150.1 - System.CommandLine 2.0.9 -> 2.0.10, Spectre.Console 0.57.1 -> 0.57.2 - Meziantou.Framework.Win32.CredentialManager 2.0.2 -> 3.0.1 - Nerdbank.GitVersioning 3.10.85 -> 3.10.91 - Test stack: MSTest.Sdk / MSTest.* 4.2.3 -> 4.3.2, Microsoft.NET.Test.Sdk 18.0.1 -> 18.8.1, Testing.Extensions.CodeCoverage 18.8.0 -> 18.9.0, Testing.Extensions.TrxReport 2.2.3 -> 2.3.2 Replace FluentAssertions 7.2.0 with AwesomeAssertions 9.5.0. FluentAssertions 8+ moved to a commercial license; AwesomeAssertions is the Apache-2.0 community fork. Updated the global using in Usings.cs from FluentAssertions to AwesomeAssertions (its 9.x root namespace); the 178 assertion call sites are otherwise unchanged. Validated: solution builds clean (0 warnings), all unit tests pass on net10.0 and net10.0-windows, and the win-x64 Native AOT single-file publish succeeds and runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5eef89d-c576-4c40-85ad-79f16260e9e2
isourabh
reviewed
Aug 4, 2026
isourabh
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR upgrades the whole solution from .NET 9 to .NET 10 and, more importantly, finally turns the CLI into a Native AOT, single-file, self-contained executable.
Why
Shipping
msstoreas a trimmed, AOT-compiled, single-file binary has been a long-standing goal (smaller download, faster cold start, no shared runtime dependency on the target machine). It was previously blocked because some key dependencies weren't trim/AOT-safe — see the old workaround comment inDirectory.Build.props:and the commented-out
PublishTrimmed/PublishAotinMSStore.CLI.csproj..NET 10 plus updated dependencies (notably
Microsoft.Identity.Clientand a new AOT/OpenTelemetry-basedMicrosoft.ApplicationInsights) now support trimming and AOT, so we can enable it for real and drop the workarounds.What changed
1. Target framework:
net9.0→net10.0All projects (
MSStore.API,MSStore.CLI,MSStore.CLI.UnitTests, the MAUI test template), publish profiles, CI/pipelines (UseDotNet→10.0.x), and binSkim globs.2. Native AOT / single-file / self-contained publishing
MSStore.CLI.csproj:PublishTrimmed,PublishAot, andPublishSingleFileare now enabled unconditionally (previously commented out / Release-only).win/linux/osx×x64/arm64): switched fromSelfContained=false+PublishReadyToRun=truetoSelfContained=true(AOT-native), dropping ReadyToRun.3. Telemetry re-implementation (required for AOT)
The old
Microsoft.ApplicationInsights2.xTelemetryClient.Context.*API isn't AOT-friendly, so it was reworked:Microsoft.ApplicationInsights2.23.0 → 3.x (OpenTelemetry-based) and wired it up viaConfigureOpenTelemetryBuilderinProgram.cs, mapping the old context fields (service name/version, instance id, runtime identifier) to OpenTelemetry resource attributes.Program.SessionId(aGuid) to replacetelemetryClient.Context.Session.Id;AzureBlobManagerand the PWABuilder correlation headers now use it directly and no longer depend onTelemetryClient.ConnectionStringis now required by App Insights 3.x, so one is set (both inProgramand in the test host).IL2026;IL3050inDirectory.Build.props, pending ApplicationInsights-dotnet#3120 — these are reported by the App Insights package but not actually hit.4. P/Invoke hardening for AOT
Services/CredentialManager/Unix/NativeMethods.cs: libsecret imports moved fromCharSet.AutotoCharSet.AnsiwithBestFitMapping=false, ThrowOnUnmappableChar=true, and the same mapping flags added to the macOS Security-framework imports (AOT-correct marshalling).5. Dependency updates (all bumped to latest)
Microsoft.Identity.Client/.Broker/.Extensions.Msal4.77.0 → 4.86.1 (trim/AOT support — the original blocker)Microsoft.Extensions.*andSystem.CommandLine: RC → stable (10.0.10 / 2.0.10)Microsoft.ApplicationInsights3.1.2,Azure.Storage.Blobs12.25 → 12.29.1Spectre.Console0.51.1 → 0.57.2,SkiaSharp(+ NativeAssets) 3.119 → 4.150.1Meziantou.Framework.Win32.CredentialManager1.7.6 → 3.0.1 (no code changes needed),Nerdbank.GitVersioning3.7.115 → 3.10.91MSTest.Sdk/MSTest.*→ 4.3.2,Microsoft.NET.Test.Sdk→ 18.8.1,Microsoft.Testing.Extensions.CodeCoverage→ 18.9.0,TrxReport→ 2.3.26. Test assertion library: FluentAssertions → AwesomeAssertions
FluentAssertions8+ switched to a commercial license (7.2.0 was the last Apache-2.0 release). Replaced it with AwesomeAssertions 9.5.0, the Apache-2.0 community fork. This is a one-line swap — the only touch point is theglobal usinginUsings.cs(updated to theAwesomeAssertionsnamespace); all 178.Should()assertions are unchanged.7. Build / CI simplification
build-nuget.yamlandpack-nuget.yaml, added a singlebuild-and-tests.yaml. GitHubbuild.ymljob renamed to "Build and Run Tests"; releaseNuGetstage renamed toBuild_And_Tests.build-clinow publishes self-contained AOT directly — no more intermediateNuGetDLLsartifact download, no--no-self-contained, no ReadyToRun. ESRP signing patterns updated for the new native outputs (libSkiaSharp.dll,msalruntime_*.dll, single-filemsstore.exe).8. Version bump
version.json:0.3.10-alpha→0.4.0-alphato reflect the runtime/packaging change.Validation
Solution builds clean (0 warnings), all unit tests pass on
net10.0andnet10.0-windows, and the win-x64 Native AOT single-file publish succeeds and runs.Open items / to confirm