Skip to content

Add IsAotCompatible/IsTrimmable to all src/ NuGet packages - #11

Merged
asawicki merged 1 commit into
mainfrom
feature/12.8a-nativeaot-compatibility
Apr 4, 2026
Merged

Add IsAotCompatible/IsTrimmable to all src/ NuGet packages#11
asawicki merged 1 commit into
mainfrom
feature/12.8a-nativeaot-compatibility

Conversation

@asawicki

@asawicki asawicki commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add src/Directory.Build.props with IsAotCompatible (TFM ≥ net8.0 guard) enabling AOT/trimming analyzers for all NuGet packages
  • Fix all 49 IL analyzer errors using dual-path strategy: [DynamicallyAccessedMembers] on public API, [UnconditionalSuppressMessage] on runtime-only reflection paths
  • Remove <NoWarn> suppressions from NativeAOT smoke test — now builds and publishes with zero warnings

Test plan

  • dotnet build Nexum.slnx — 0 warnings, 0 errors
  • dotnet test Nexum.slnx — 601 passed, 0 failed
  • dotnet publish tests/Nexum.NativeAot.SmokeTest -c Release — zero IL warnings
  • NativeAOT smoke test binary execution — "NativeAOT smoke test passed!"
  • Contract test snapshots updated for new public API attributes

Implements task 12.8a from TASKS-MVP.md → ADR-005

… AOT analyzer errors

Enable NativeAOT and trimming compatibility across all Nexum packages by adding
src/Directory.Build.props with IsAotCompatible (TFM >= net8.0 guard). Fix all IL
analyzer errors using dual-path strategy: [DynamicallyAccessedMembers] on public
API parameters, [UnconditionalSuppressMessage] on runtime-only reflection paths,
and [RequiresUnreferencedCode]/[RequiresDynamicCode] on endpoint mapping methods.
Remove NoWarn suppressions from NativeAOT smoke test — now builds with zero warnings.
@github-actions

github-actions Bot commented Apr 4, 2026

Copy link
Copy Markdown

Test Results

601 tests  ±0   601 ✅ ±0   2m 9s ⏱️ +12s
 15 suites ±0     0 💤 ±0 
 15 files   ±0     0 ❌ ±0 

Results for commit f23bf2e. ± Comparison against base commit cbb1bfd.

@asawicki
asawicki merged commit 0251934 into main Apr 4, 2026
6 checks passed
@asawicki
asawicki deleted the feature/12.8a-nativeaot-compatibility branch April 8, 2026 05:44
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