↑↓ to navigate Enter to open "…" all these words ANDOR to combine

Architecture Decision Record

ADR-101: An MMCA.Common Metapackage for the Core Six

Status

Accepted (2026-08-29, framework v1.170.0). Extends ADR-053 (the metapackage ships to both registries from the same tag, through the same workflow) and inherits ADR-016 unchanged (it releases at the same version as everything else, and adds one more entry to the set a consumer sweeps together). The authoritative package list and count live in FACTS.md; this record does not restate them. Revised 2026-10-07: the lockstep rationale now says the metapackage sets its six dependencies as minimum-version floors rather than exact pins, and the host claim says application hosts depend on all six mostly transitively; anchors refreshed after the v1.233.0 release. Revised 2026-10-21: anchors refreshed after the package-consumption CI stages moved into build/consumer-check/Invoke-ConsumerCheck.ps1. Revised 2026-10-26: the Rationale now says the gateway hosts take MMCA.Common.Aspire, MMCA.Common.Azure and MMCA.Common.Gateway directly (and, through Azure, every core layer except API) and that the Blazor web hosts also reference MMCA.Common.Azure; package-consumption CI anchors refreshed. Revised 2026-10-28: anchors refreshed after the package-consumption CI job and the Store gateway's package references moved. Revised 2026-11-23: the Rationale now says the gateway hosts take MMCA.Common.Azure.Startup rather than MMCA.Common.Azure and depend transitively on Shared alone, not on every core layer except API; package-consumption CI and consumer-check anchors refreshed. Revised 2026-11-24: the version is the release tag passed to the pack, with MinVer gone from the build (MMCA.Common 1.318.0, ADR-016 Amendment (2026-11-24)); Decision 3 is corrected in place.

Context

ADR-053 made the install path credential-free: dotnet add package MMCA.Common.API works for anyone, from nuget.org, with no token and no hand-written nuget.config. What it did not shorten is the number of lines that follow. A standard application pins six packages before it pins anything of its own (its application hosts depend on all six, mostly transitively), and their names are the layer names, so the list reads as the architecture but also as six chances to get an incomplete set: an app that takes Application and Infrastructure but not API compiles until the first controller, and one that omits Aspire compiles until AddServiceDefaults.

The friction lands hardest exactly where this release is trying to lower the floor. A reader following the getting-started path, or an adopter retrofitting an existing solution by hand, types six PackageReference elements plus six PackageVersion pins under Central Package Management, twelve lines of ceremony before a using directive.

Nothing about the layer packages themselves is wrong: the split is what makes the layer rules enforceable at the package level and lets a Blazor WebAssembly project take MMCA.Common.Shared alone. The question this record answers is only whether the common case has to be spelled out every time.

Decision

Publish a metapackage named MMCA.Common that carries dependencies and no code.

  1. It bundles the Core 6, in layer order. Source/MMCA.Common/MMCA.Common.csproj:26-31 references Shared, Domain, Application, Infrastructure, API and Aspire, ordered so the bundle reads as the architecture it installs (:23-25). One PackageReference replaces six.

  2. It ships no assembly. IncludeBuildOutput is false (:9) because a metapackage ships dependencies, not code: the project has no compile items of its own, and packing its empty assembly would add a DLL every consumer loads for nothing (:5-8). NU5128 (a dependency group with no matching lib/ folder) is suppressed in this project alone, because that warning describes exactly the shape IncludeBuildOutput=false is meant to produce and TreatWarningsAsErrors would otherwise turn it into a pack failure (:10-14).

  3. It is an ordinary packable project in every other respect. Version is the same release tag, packaging metadata from Directory.Build.props, and the repository README is packed with it (:34). It therefore publishes to both registries in the same release run with no workflow change (ADR-053).

  4. UI, Gateway, Grpc, Aspire.Hosting and the Testing packages stay out. The bundle is what a standard application host needs. A Blazor host takes MMCA.Common.UI / UI.Web, a gateway takes MMCA.Common.Gateway, a service exposing gRPC takes MMCA.Common.Grpc, an AppHost takes MMCA.Common.Aspire.Hosting, and test projects take the Testing.* set. Each of those belongs to a specific project in the solution rather than to every host, and MMCA.Common.UI.Maui could not be included in any case: it is the one MAUI-TFM package, built outside the solution by dedicated Windows jobs (ADR-042), so a net10.0 metapackage cannot reference it.

  5. The name is the bare prefix, deliberately. MMCA.Common was the one unused id in the family and it is the one a reader guesses first. It carries the ADR-016 lockstep contract like every other MMCA.Common.* id.

  6. Nothing switches to it. ADC, Store and MMCA.Helpdesk keep their explicit per-layer pins, and the MMCA.Templates scaffold still generates the six-line set. The metapackage is an option for a new adopter, not a migration anyone is asked to run.

Rationale

  • The common case should cost one line. Six references is not hard, it is repetitive and order-independent noise that a reader has to verify rather than read, and getting it wrong fails later than it should.
  • The set is not arbitrary. Every application in this workspace pins all six under Central Package Management (among its other MMCA.Common.* entries), and its application hosts (API, service and Blazor web hosts, not the YARP gateway, which references MMCA.Common.Aspire, MMCA.Common.Azure.Startup and MMCA.Common.Gateway and through Aspire depends on Shared alone) end up depending on all six, although none references all of them directly: a host references MMCA.Common.Aspire (plus MMCA.Common.Azure and MMCA.Common.API in the ADC and Store Blazor web hosts) and receives the other layers transitively through its module projects or the API package's own dependencies. Bundling a set that real hosts already depend on together is a shortcut, not a new opinion about what belongs where.
  • A code-free package cannot drift from the layers. With no assembly, there is nothing for the metapackage to expose, deprecate or version independently: it is a list of dependencies, and the layer rules keep being enforced by the packages it points at.
  • Lockstep makes it safe. Because every package ships at one version from one tag (ADR-016), the metapackage declares its six dependencies at a minimum of its own version (plain ProjectReference items packed as NuGet floors, not exact [X] ranges), and a consumer bumping it raises all six. The floor does not forbid a consumer from also pinning a layer entry above the metapackage (the layers also take each other as floors, so raising one above a directly pinned layer it depends on is an NU1605 downgrade error instead); ADR-016's one-pass sweep, not the metapackage, keeps the set in agreement.
  • Excluding the specialised packages keeps the bundle honest. A metapackage that also pulled UI and Testing would put MudBlazor and Playwright into a headless API host, which is the failure mode that makes people distrust metapackages in the first place.

Trade-offs

  • A consumer mixing both forms has more pins to keep in step, not fewer. An app taking MMCA.Common plus MMCA.Common.UI and the Testing.* set still has to sweep every entry to the same version in one pass (ADR-016), and the metapackage is one more entry in that sweep rather than a replacement for it. Nothing in the bundle relaxes the no-phased-rollout rule.
  • It hides which layer a type came from. Part of the value of the split is that a PackageReference list states the layers a project participates in. A single reference gives that up, which matters most in the project where it matters least (the host, which depends on all of them anyway).
  • It can pull more than a project needs. A host that genuinely wants no Aspire dependency should keep the explicit five rather than take the bundle: the metapackage has one shape, and trimming it per consumer would defeat the point.
  • NU5128 is suppressed rather than avoided. The suppression is scoped to this project and justified in place, but it is a warning switched off, and a future genuine packaging problem in this project would have to be caught by the pack output rather than by the build.
  • No consumer exercises it. The package-consumption CI job (MMCA.Common/.github/workflows/ci.yml:924, stage steps :962-987) runs its stages through MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1, whose pack stage packs every package in MMCA.Common.slnx (:143-147), the metapackage included, so a pack break is caught, but it never restores the metapackage: its throwaway consumer references only MMCA.Common.API, MMCA.Common.Infrastructure and MMCA.Common.Testing.Architecture (:185-187), its layer-rule probes take only Domain, Application and Infrastructure (:262-278), and the MMCA.Common.* source-mapping pattern in the generated nuget.config (:168) would not route the bare MMCA.Common id, which falls through to nuget.org under the * pattern (:171). No application in this workspace builds against the metapackage today, so its ergonomics are asserted rather than demonstrated. That is a deliberate consequence of point 6.

Revision (2026-10-07)

Re-verified against current source. The decision is unchanged: MMCA.Common still bundles Shared, Domain, Application, Infrastructure, API and Aspire in layer order (MMCA.Common/Source/MMCA.Common/MMCA.Common.csproj:26-31), still ships no assembly (:9) with NU5128 suppressed in this project alone (:14), and no application or CI consumer restores it. Two rationale statements were stated more strongly than source supports and are corrected in place.

  1. The six dependencies are floors, not exact pins. The metapackage references the six through plain ProjectReference items (MMCA.Common/Source/MMCA.Common/MMCA.Common.csproj:26-31), which NuGet packs as bare version="X" dependencies, a minimum-inclusive range, and nothing in MMCA.Common/Directory.Build.props rewrites them to exact [X] ranges. The floor equals the metapackage's own version, so bumping it raises all six, but a consumer can still pin a layer entry above the metapackage without a restore error, unless it also pins, at the old version, a layer the raised one depends on (the layers take each other as floors too, for example MMCA.Common/Source/Presentation/MMCA.Common.API/MMCA.Common.API.csproj:33-34, so that case is an NU1605 downgrade). Agreement of the set comes from the ADR-016 one-pass sweep, and the Rationale bullet now says so.
  2. Hosts depend on the six mostly transitively. No host in ADC, Store or MMCA.Helpdesk references all six directly, and the ADC and Store gateway hosts depend on none of the layers below Aspire (they take only MMCA.Common.Aspire and MMCA.Common.Gateway, MMCA.ADC/Source/Hosts/MMCA.ADC.Gateway/MMCA.ADC.Gateway.csproj:3-4); the Context, Rationale and Trade-offs now say application hosts depend on all six. The Helpdesk web host references only MMCA.Common.Aspire (MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/MMCA.Helpdesk.Web.csproj:10) and gets the other layers through its module and migrations ProjectReference items (:13-14); the ADC and Store Blazor web hosts reference Aspire and API (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/MMCA.ADC.UI.Web.csproj:14-15, MMCA.Store/Source/Hosts/UI/MMCA.Store.UI.Web/MMCA.Store.UI.Web.csproj:16-17). What every application does take as a set is the six PackageVersion pins (MMCA.Helpdesk/Directory.Packages.props:84-89). The Rationale bullet now states that.
  3. Anchors re-verified against current source: the pack step is MMCA.Common/.github/workflows/ci.yml:671 (it packs every MMCA.Common.slnx package, the metapackage included), the throwaway consumer's three PackageReference items are :706-708, the layer-rule probes that also never take the bare id are :750-757, and the MMCA.Common.* source-mapping pattern is :690.

Revision (2026-10-21)

Re-verified against current source. The decision and every Trade-off are unchanged: the metapackage still bundles the six in layer order (MMCA.Common/Source/MMCA.Common/MMCA.Common.csproj:26-31), still ships no assembly (:9) with NU5128 suppressed (:14), and the package-consumption check still packs it without ever restoring it. What moved is where that check lives: the CI job's pack, scaffold, build and probe stages are now one script that ci.yml invokes stage by stage, so the Trade-offs bullet cites the script instead of inline workflow steps.

  1. The package-consumption check runs through a script. Each step of the job calls MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1 with one -Stage (MMCA.Common/.github/workflows/ci.yml:674-699). The script packs MMCA.Common.slnx (:143-147), writes the throwaway consumer's nuget.config mapping MMCA.Common.* to the local feed and * to nuget.org (:168, :171), references only API, Infrastructure and Testing.Architecture (:184-186), and builds layer-rule probes over Domain, Application and Infrastructure only (:261-277). The bare MMCA.Common id is referenced nowhere, so the "No consumer exercises it" statement still holds; the bullet is re-anchored in place.
  2. Anchors re-verified against current source: the six core PackageVersion pins are MMCA.Helpdesk/Directory.Packages.props:83-88 (ADC and Store carry the same six), the job steps MMCA.Common/.github/workflows/ci.yml:674-699, and the script stages MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1:143-147, :168, :171, :184-186 and :261-277.

Revision (2026-10-26)

Re-verified against current source. The decision, the Trade-offs and the "No consumer exercises it" statement are unchanged: the metapackage still bundles the six in layer order (MMCA.Common/Source/MMCA.Common/MMCA.Common.csproj:26-31), still ships no assembly (:9) with NU5128 suppressed (:14), and the package-consumption check still packs it without restoring it. Two Rationale statements about which hosts take MMCA.Common.Azure are corrected, and the CI job anchors moved.

  1. The gateway hosts also take MMCA.Common.Azure. The ADC gateway references MMCA.Common.Aspire, MMCA.Common.Azure and MMCA.Common.Gateway (MMCA.ADC/Source/Hosts/MMCA.ADC.Gateway/MMCA.ADC.Gateway.csproj:3-5), and the Store gateway the same three (MMCA.Store/Source/Hosts/MMCA.Store.Gateway/MMCA.Store.Gateway.csproj:25-27). Neither references a core layer directly, but MMCA.Common.Azure references Infrastructure and Aspire (MMCA.Common/Source/Hosting/MMCA.Common.Azure/MMCA.Common.Azure.csproj:43-44), so each gateway now resolves Shared, Domain, Application and Infrastructure transitively (MMCA.ADC/Source/Hosts/MMCA.ADC.Gateway/packages.lock.json:40, :74, :1047, :1061). API is the one core layer absent, so the gateway is still not an all-six host; the Rationale bullet no longer says the gateway takes only Aspire and Gateway, and states the transitive set.
  2. The Blazor web hosts also take MMCA.Common.Azure. The ADC and Store Blazor web hosts reference Aspire, Azure and API (MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/MMCA.ADC.UI.Web.csproj:14-16, MMCA.Store/Source/Hosts/UI/MMCA.Store.UI.Web/MMCA.Store.UI.Web.csproj:16-18); the Rationale bullet now names Azure alongside API for those hosts.
  3. Anchors re-verified against current source: the package-consumption job header is MMCA.Common/.github/workflows/ci.yml:693 and its four stage steps, each calling Invoke-ConsumerCheck.ps1 with one -Stage, run :727-752 (Pack :730, Scaffold :737, Build :742, Probes :752); the script stages are unchanged at MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1:143-147, :168, :171, :184-186 and :261-277. The ADC and Store Blazor web hosts reference Aspire and API at MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/MMCA.ADC.UI.Web.csproj:14 and :16, and MMCA.Store/Source/Hosts/UI/MMCA.Store.UI.Web/MMCA.Store.UI.Web.csproj:16 and :18. The six core PackageVersion pins remain MMCA.Helpdesk/Directory.Packages.props:83-88, and the API package's Application and Infrastructure floors are MMCA.Common/Source/Presentation/MMCA.Common.API/MMCA.Common.API.csproj:32-33.

Revision (2026-10-28)

Re-verified against current source. The decision, the Rationale, the Trade-offs and the "No consumer exercises it" statement are unchanged: the package-consumption check still packs every MMCA.Common.slnx package and its throwaway consumer still never references the bare MMCA.Common id. Only anchors moved, in the CI workflow and the Store gateway project.

  1. Anchors re-verified against current source: the package-consumption job header is MMCA.Common/.github/workflows/ci.yml:725 and its four stage steps, each calling Invoke-ConsumerCheck.ps1 with one -Stage, run :759-784 (Pack :762, Scaffold :769, Build :774, Probes :784); the Trade-offs bullet is re-anchored in place. The script stages are unchanged at MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1:143-147, :168, :171 and :184-186. The Store gateway's three PackageReference items (MMCA.Common.Aspire, MMCA.Common.Azure, MMCA.Common.Gateway) are now MMCA.Store/Source/Hosts/MMCA.Store.Gateway/MMCA.Store.Gateway.csproj:27-29; what it references is unchanged.

Revision (2026-11-23)

Re-verified against current source. The decision, the Trade-offs and the "No consumer exercises it" statement are unchanged: the metapackage still bundles the six in layer order (MMCA.Common/Source/MMCA.Common/MMCA.Common.csproj:26-31), still ships no assembly (:9) with NU5128 suppressed (:14), and the package-consumption check still packs it without restoring it. One Rationale statement about the gateway hosts is corrected, and the CI and script anchors moved.

  1. The gateway hosts take MMCA.Common.Azure.Startup, not MMCA.Common.Azure, and depend on Shared alone. The ADC gateway references MMCA.Common.Aspire, MMCA.Common.Azure.Startup and MMCA.Common.Gateway (MMCA.ADC/Source/Hosts/MMCA.ADC.Gateway/MMCA.ADC.Gateway.csproj:3, :6, :7), and the Store gateway the same three (MMCA.Store/Source/Hosts/MMCA.Store.Gateway/MMCA.Store.Gateway.csproj:27-29). Azure.Startup references only Aspire (MMCA.Common/Source/Hosting/MMCA.Common.Azure.Startup/MMCA.Common.Azure.Startup.csproj:37), Aspire references only Shared (MMCA.Common/Source/Hosting/MMCA.Common.Aspire/MMCA.Common.Aspire.csproj:67), and MMCA.Common.Gateway takes no MMCA project reference, so each gateway's lock file resolves Shared as its only core layer (MMCA.ADC/Source/Hosts/MMCA.ADC.Gateway/packages.lock.json:696, MMCA.Store/Source/Hosts/MMCA.Store.Gateway/packages.lock.json:696). The Rationale bullet no longer says the gateway depends on every core layer except API through Azure. MMCA.Common.Azure itself references Infrastructure, Aspire and Azure.Startup (MMCA.Common/Source/Hosting/MMCA.Common.Azure/MMCA.Common.Azure.csproj:45-47) and is taken by the ADC and Store Blazor web hosts, not by the gateways.
  2. Anchors re-verified against current source: the package-consumption job header is MMCA.Common/.github/workflows/ci.yml:924 and its four stage steps, each calling Invoke-ConsumerCheck.ps1 with one -Stage, run :962-987 (Pack :965, Scaffold :972, Build :977, Probes :987). The script stages are MMCA.Common/build/consumer-check/Invoke-ConsumerCheck.ps1:143-147 (pack), :168 and :171 (source mapping), :185-187 (the three PackageReference items) and :262-278 (the layer-rule probes, still over Domain, Application and Infrastructure only); the Trade-offs bullet is re-anchored in place. The ADC and Store Blazor web hosts reference Aspire, Azure and API at MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/MMCA.ADC.UI.Web.csproj:14-16 and MMCA.Store/Source/Hosts/UI/MMCA.Store.UI.Web/MMCA.Store.UI.Web.csproj:16-18. The Helpdesk web host's only MMCA package reference is Aspire (MMCA.Helpdesk/Source/Hosts/MMCA.Helpdesk.Web/MMCA.Helpdesk.Web.csproj:5), with the migrations and module ProjectReference items at :8 and :9 (the module carries API, MMCA.Helpdesk/Source/Modules/Tickets/MMCA.Helpdesk.Tickets.API/MMCA.Helpdesk.Tickets.API.csproj:3). The six core PackageVersion pins are MMCA.Helpdesk/Directory.Packages.props:85-90, MMCA.ADC/Directory.Packages.props:148-151 and :161-162, and MMCA.Store/Directory.Packages.props:28-33.

ADR-053 (dual-registry publishing, which the metapackage joins with no workflow change), ADR-016 (one version for every package, one sweep per consumer: the property that makes bundling safe), ADR-042 (MMCA.Common.UI.Maui, the MAUI-TFM package built outside the solution and therefore unreferenceable from a net10.0 bundle), ADR-015 (the layer rules and the public-API surface gate that keep operating on the individual packages the bundle points at), ADR-065 (the scaffold, which is the other answer to the same adoption-floor problem and still emits the explicit set).