Deployment-mode support
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
This guide records the current Cephalon support contract for trimming, Native AOT, and single-file publishing.
Current contract
Section titled “Current contract”| Concern | Current contract | Notes |
|---|---|---|
| Stable shipping floor | net10.0 | Cephalon still ships stable packages, templates, and samples on the current LTS baseline. |
| Higher-SDK readiness lane | net11.0 assessment-only | .NET 11 remains a readiness lane, not a supported default-target migration. |
| Trim | not-claimed | Trimming is not part of the current Cephalon support contract. |
| Native AOT | not-claimed | Native AOT is not part of the current Cephalon support contract. |
| Single-file | not-claimed | Single-file publishing is not part of the current Cephalon support contract. |
Source of truth
Section titled “Source of truth”Cephalon now keeps this contract explicit in two layers:
- machine-readable manifest:
scripts/deployment-mode-support.json(schema1.1.0; per-moderequiredProjectProperties,requiredAnalyzerProperties,warningPatterns, plusrepresentativePublishTargets,expectedPublishOutputShape,deploymentModeEligibility, andknownTransitiveHazards) - repo-native validation and reporting:
scripts/validate-dotnet-readiness.ps1
The broader framework-readiness story stays aligned through:
External adopters can read that same contract through:
cephalon doctorfor the machine-level shipping floor, readiness lane, and current trim / Native AOT / single-file posturecephalon doctor --app-root <path>for generated-app bootstrap plus generated host target-framework, generated self-hosted and hosted deployment assets, generated container deployment assets, generated Dockerfile baseline, and publish-mode claim posture against the same contract
What the current statuses mean
Section titled “What the current statuses mean”not-claimedmeans Cephalon does not currently publish trim, Native AOT, or single-file as supported deployment modes for external adopters.not-claimeddoes not block targeted local experiments, but those experiments do not become repo truth by themselves.- analyzer-only signals remain useful readiness input, but they do not widen the support contract without matching validation, docs, and planning updates.
The reserved future claimed state should only be used once Cephalon intentionally enables and validates that deployment mode as part of the shipped framework story.
How a support claim changes
Section titled “How a support claim changes”For trim, Native AOT, or single-file support to become real Cephalon support statements, all of the following must move together:
- project properties that intentionally enable or declare the deployment mode
scripts/validate-dotnet-readiness.ps1- release-validation workflow coverage
docs/deployment-mode-support.mddocs/compatibility.mddocs/package-publishing.mddocs/project-memory.mddocs/engine-roadmap.mddocs/engine-backlog.md
Validation harness (initial slice shipped, follow-through pending)
Section titled “Validation harness (initial slice shipped, follow-through pending)”Today the support claim is not-claimed across trim, Native AOT, and single-file. To move any of those to a real claimed state honestly, Cephalon needs a machine-checkable validation harness that proves the claim against actual dotnet publish results, not only against analyzer signals. The first slice of that harness now ships as scripts/validate-deployment-mode-claims.ps1 with comprehensive Pester coverage at tests/Cephalon.Tests.Scripts/validate-deployment-mode-claims.Tests.ps1. The follow-through work (CI integration via scripts/validate-release.ps1, the manifest schema extension below, and an actual representative-publish-target list) is still planned.
The shipped harness now runs as part of scripts/validate-release.ps1 through the opt-out -SkipDeploymentModeClaims switch (audit-only by default until representativePublishTargets.projects is populated), so framework readiness and deployment-mode claim truth are reportable in one release-validation flow. The harness also now reads its per-mode requiredProjectProperties, requiredAnalyzerProperties, and warningPatterns from scripts/deployment-mode-support.json schema 1.1.0 directly through Get-DeploymentModeConfigFromManifest, with the hardcoded $Script:DeploymentModeConfigs table kept as a fallback for legacy manifests; manifest edits to those fields take effect on the next harness run without code changes.
Planned manifest schema additions in scripts/deployment-mode-support.json:
validationStrategy:analyzer-only,publish-required, orfull-flow- per-package
deploymentModeEligibility:packageName,nugetId,supportedModesper claim,requiredProjectPropertiesper claim,minimumAnalyzerPackVersion, andknownHazards: [](reflection, native interop, dynamic dispatch, third-party transitive risk) representativePublishTargets: []: the small set of packages the harness actually publishes during validation so the claim is anchored in real binary outputexpectedPublishOutputShape: shape constraints (single-file binary signature, allowed warning categories, allowed size bounds)
Planned harness phases:
- project-property audit scans every
src/Cephalon.*/*.csprojand reports which projects set the claimed deployment-mode properties and which do not - analyzer phase verifies the matching analyzer pack is enabled and at or above
minimumAnalyzerPackVersionfor projects that claim AOT or trim - publish phase runs
dotnet publish -c Releasewith the requested mode against eachrepresentativePublishTargetsentry and captures exit code, warnings, errors, and binary artefacts - report phase writes
artifacts/deployment-mode-release/{mode}-claim-validation-report.jsonplus a human-readableREADME.md
Aggregate verdicts the report emits:
claim-truthful— manifest claims the mode, all targets publish cleanly, analyzers passclaim-overstated— manifest claims the mode, but publish or analyzer results show warnings or errors that contradict the claimnot-claimed— manifest saysnot-claimedand the audit confirms no project sets the matching propertiesmixed— partial pass across multiple packages
Known risks the harness must report on rather than hide:
- transitive dependencies that emit
IL2026/IL3050/ NETSDK trim or AOT warnings even when the Cephalon package itself looks clean - native interop in cloud-provider SDKs (
AWSSDK.*,Azure.*,Google.*) that may break Native AOT in non-obvious ways - reflection in source-generated boundaries and consumer code that invokes generated stubs reflectively
- benchmark and test utilities (
BenchmarkDotNet, broad reflection) that should not poison the framework claim - analyzer-pack version drift where a project claims AOT but uses an older analyzer that misses violations
When the harness ships, this section is rewritten in place to describe the actual validation flow, the report path, and the workflow integration; cross-references in compatibility.md, engineering-standards.md, dotnet11-readiness.md, and project-memory.md are updated together in the same slice.
Until the harness ships, the support contract above stays at not-claimed for trim, Native AOT, and single-file; analyzer-only or local-experiment signals do not widen the contract.
What this guide does not mean
Section titled “What this guide does not mean”- it does not move Cephalon’s shipping floor from
net10.0 - it does not turn
.NET 11readiness into a default-target migration - it does not claim trim, Native AOT, or single-file compatibility today
- it does not let support statements outrun what the readiness report and release-validation flow actually prove