[!TIP] This page documents the
dotnet new bitzorcas-hosttemplate-matrix contract. For greenfield projects prefer the bitz scaffolder orthogonal flags; both channels share the same verified consumer baseline.
This page maps to .template.config/template.json in BitzOrcas.Modern.Templates 1.0.0-alpha1. Read Template selection for intent and Create a Consumer Solution for the end-to-end workflow.
Command shape
# Point output at an empty directory and use the lowercase values shown by Help.dotnet new bitzorcas-host \ --name <SolutionName> \ --output <EmptyDirectory> \ --ProfileChoice <profile> \ --RuntimeAdapter <sqlsugar|efcore>The template has exactly two business parameters:
| Parameter | Type | Default | Current contract |
|---|---|---|---|
--ProfileChoice | choice | default-business-single | 15 complete Profiles selecting topology, tenancy, deployment, and one optional extension |
--RuntimeAdapter | choice | sqlsugar | sqlsugar or efcore, selecting the physical ORM provider |
Use the lowercase values shown by Help. Omitting both options generates default-business-single + sqlsugar. The Help text is the contract itself — real output below (narrow-terminal wraps collapsed to logical lines):
Standard dotnet new options
--name (-n), --output (-o), and --force come from the template engine. The template sets preferNameDirectory=true and uses BitzConsumer as its source replacement:
dotnet new bitzorcas-host -n Acme.Cases -o ./Acme.CasesThis renames BitzConsumer.slnx, projects, namespaces, and paths to Acme.Cases. Use an empty output directory. --force may overwrite generated files and is not an upgrade mechanism.
Complete ProfileChoice matrix
| ProfileChoice | BaseProfileChoice | Tenancy | Deployment | PlatformModule | IndustryExtension |
|---|---|---|---|---|---|
mini-api-single | mini-api-single | single | none | none | none |
default-business-single | default-business-single | single | none | none | none |
default-business-single-authorization | default-business-single | single | none | authorization | none |
default-business-single-masterdata | default-business-single | single | none | masterdata | none |
default-business-single-finance | default-business-single | single | none | none | finance |
default-business-single-hr | default-business-single | single | none | none | hr |
default-business-single-auction | default-business-single | single | none | none | auction |
default-business-single-legal | default-business-single | single | none | none | legal |
default-business-multi | default-business-multi | multi | aspire | none | none |
default-business-multi-authorization | default-business-multi | multi | aspire | authorization | none |
default-business-multi-masterdata | default-business-multi | multi | aspire | masterdata | none |
default-business-multi-finance | default-business-multi | multi | aspire | none | finance |
default-business-multi-hr | default-business-multi | multi | aspire | none | hr |
default-business-multi-auction | default-business-multi | multi | aspire | none | auction |
default-business-multi-legal | default-business-multi | multi | aspire | none | legal |
BaseProfileChoice, PlatformModule, and IndustryExtension are internal generated symbols. A caller cannot pass them separately or compose a sixteenth Profile.
RuntimeAdapter
| Value | Host registration | Typical persistence package | Schema wiring |
|---|---|---|---|
sqlsugar | AddBitzOrcasSqlSugar | BitzOrcas.Framework.Infrastructure.SqlSugar | SqlSugar schema operations |
efcore | AddBitzOrcasEfCore | EF Core Infrastructure closure | IEfCoreSchemaMigrationContribution |
Authorization variants use the corresponding provider registration with messaging integration. Behavioral tests inspect the selected ORM; editing the manifest string cannot migrate a project.
Base asset selection
The package maintains three base shapes, with SqlSugar and EF Core directories for each: six native trees in total.
| Asset root | Selection | Fixed projects |
|---|---|---|
mini-api-single/<orm> | Mini Profile + ORM | API, ServiceDefaults, two test projects |
default-business-single/<orm> | any Single Business Profile + ORM | API, ServiceDefaults, Starter Contracts/Application, two test projects |
default-business-multi/<orm> | any Multi Business Profile + ORM | Single Business projects + AppHost |
Extension Profiles reuse the matching base tree. Template conditions retain selected package references, runtime registration, and adoption tests. The Cartesian product of Profiles and ORMs is 30 physical generation paths.
Platform and Industry constraints
PlatformModule
authorization: Authorization package, provider, license feature, operations command, and adoption tests; Multi AppHost also orchestrates RabbitMQ and bootstrap.masterdata: MasterData package, provider, license feature, and adoption tests.none: neither Platform runtime is referenced.
IndustryExtension
finance,hr,auction, andlegaladd package closure and module capability to Business Starter;- an industry Profile is not a Platform runtime module;
- some industry packages have transitive dependencies, so inspect final manifest
packages; - no current Profile combines a Platform suffix with an Industry suffix.
Generated artifact contract
The root always contains:
<Name>.slnxDirectory.Build.propsDirectory.Build.targetsDirectory.Packages.propsNuGet.ConfigREADME.mdcomposition-manifest.jsoncomposition-manifest.schema.jsoncomposition-plan.jsonsrc/tests/composition-manifest.json currently uses schemaVersion: 2. It records profileChoice, profileId, runtimeAdapter, tenancy, deployment, platformModule, industryExtension, Hosts, projects, packages, capabilities, license features, and verification commands.
composition-plan.json currently uses schemaVersion: 1. It records selectedProjects, selectedEndpoints, selectedJobs, writeFiles, and removePaths. It is an output review artifact, not an editable generation request.
Profile and package closure
| Base Profile | Profile package | Business source |
|---|---|---|
| Mini API | BitzOrcas.Profile.Mini.Api | no Starter Module |
| Default Business | BitzOrcas.Profile.Default.Business | customer-owned Starter Contracts/Application |
Framework, Workflow, Licensing, Generator, Platform, and Industry capabilities restore from commercial packages. The template must not copy foundation Framework or Platform source into a Consumer.
Schema command boundary
Business and persistence Profiles expose the schema operations documented by their generated README:
# SqlSugar currently adopts apply.dotnet run --project src/Hosts/<Name>.Api -- --migrate-schema apply
# EF Core supports modes including plan, status, and apply.dotnet run --project src/Hosts/<Name>.Api -- --migrate-schema statusMulti AppHost starts a one-shot schema-migrator with --migrate-schema apply and prevents API start through WaitForCompletion if migration fails. Single Profiles have no AppHost; the deployment runbook invokes schema operations explicitly.
Parameter failures
The dotnet new choice validator rejects unknown Profiles and ORMs. Inspect the locally installed version before diagnosing:
dotnet new bitzorcas-host --helpdotnet new uninstall BitzOrcas.Modern.Templatesdotnet new install BitzOrcas.Modern.Templates@1.0.0-alpha1If Help differs from this page, first check for an old local template or wrong package channel. Do not edit install caches or generated manifests to bypass constraints.
Release verification boundary
The foundation verify-template.sh currently performs:
- physical generation and structural checks for all 15 Profiles × 2 ORMs;
- commercial restore, build, test, and API publish for 22 stratified combinations;
- trimmed publish for 10 representative combinations;
- Consumer source-boundary, secret, unselected-ORM, architecture, and schema-adoption checks.
These counts describe the template release gate. They do not prove later customer changes remain compliant. Consumer CI continues to run generated Unit and Architecture tests.