Thank you for your interest in contributing to this project!
- .NET SDK (version specified in
global.json) - Node.js 22+ (only for documentation)
git clone <repo-url>
cd <repo-folder>
dotnet restore
dotnet build
dotnet testThis project uses NUKE for build automation. All build logic lives in build/BuildTask.*.cs.
Common targets:
| Target | Description |
|---|---|
./build.sh Build |
Compile all projects |
./build.sh Test |
Run tests |
./build.sh CoverageReport |
Generate coverage report with threshold enforcement |
./build.sh Format |
Verify code formatting |
./build.sh Pack |
Create NuGet packages |
./build.sh ShowVersion |
Display current version |
./build.sh Benchmark |
Run BenchmarkDotNet benchmarks (requires benchmarks/ projects) |
./build.sh MutationTest |
Run Stryker.NET mutation testing |
The CI pipeline behavior is controlled by boolean switches in .github/workflows/ci.yml under env::
| Switch | Default | Purpose |
|---|---|---|
ENABLE_NUGET |
true |
NuGet package generation and publishing |
NUGET_USE_OIDC |
false |
false = API key, true = Trusted Publishing (OIDC) |
ENABLE_INSTALLERS |
true |
Platform installer zips (Publish + PackageApp) |
ENABLE_ANDROID |
false |
Android workload in build matrix |
ENABLE_IOS |
false |
iOS workload in build matrix |
- Create a feature branch from
main. - Make your changes, ensuring tests pass and code formatting is correct.
- Submit a pull request targeting
main.
- Code style is enforced by
.editorconfiganddotnet format. - Run
./build.sh Formatlocally before committing. - All warnings are treated as errors (
TreatWarningsAsErrors).
New work should follow the logical taxonomy FrameworkCore / Application / Extension / Host:
FrameworkCore: broadly reusable technical capabilities and modularity primitives.Application: reusable business capabilities and bounded contexts.Extension: optional modules that attach a capability to a concrete technology or transport, such asPersistence,Web,Memory, or futureRedisandMongoDbadapters.Host: runnable shells that compose modules and provide environment configuration.
Use responsibility to classify a module, not directory name alone. A project under src/Framework/ can still be an Extension if it is technology-specific, such as ChengYuan.Caching.Memory.
New production modules must inherit a category-specific base class:
FrameworkCoreModulefor framework capabilities.ApplicationModulefor business capabilities.ExtensionModulefor persistence, web, memory, worker, or other technology adapters.HostModulefor host shells and composition modules.
Direct ModuleBase inheritance is reserved for low-level modularity infrastructure only. The shared service-registration entry point ConfigureServices(IServiceCollection services) remains the same across all categories.
During the current architecture refactor:
- Keep explicit
DependsOnmodule composition. - Do not introduce automatic module discovery.
- Move application persistence registration out of Hosts and back into the corresponding
*.Persistenceextension modules. - Keep Host internals layered. For WebHost, separate framework composition, application composition, and HTTP/runtime glue into different composition modules instead of one all-knowing host module.
- Keep
Program.csthin by routing setup through host composition seams such asAddWebHostComposition(...)andUseWebHostComposition().
- Version is managed via
VersionPrefixinDirectory.Build.props. - A release is triggered automatically when a new version is pushed to
mainand the corresponding git tag does not yet exist.
- Packable projects track their public API surface via
PublicAPI.Shipped.txtandPublicAPI.Unshipped.txt. - When adding or modifying public APIs, update
PublicAPI.Unshipped.txtaccordingly.