Appearance
.NET 10 Solution Scaffold Guide
Project: Cadence Clinical Research Software Platform Target Runtime: .NET 10 (C# 14 / ASP.NET Core 10 Minimal APIs) Governing ADRs: ADR-2233, ADR-2428Script Location: scripts/scaffold_dotnet_solution.sh
1. Overview
The Cadence Clinical platform provides an automated, idempotent scaffolding script that generates the complete .NET 10 solution topology across all 18 microservices and core shared packages, binding them into Cadence.sln under Central Package Management (CPM).
2. Prerequisites
- .NET 10 SDK: Verify your active .NET SDK:bashMust be
dotnet --version.NET 10.0.100or preview equivalent matchingglobal.json. - SDK HTTPS Development Certificate:bash
dotnet dev-certs https --trust - CPM Configuration: Ensure
Directory.Build.propsandDirectory.Packages.propsexist at the solution root.
3. Running the Scaffold
Execute the scaffold script directly from the repository root:
bash
./scripts/scaffold_dotnet_solution.shAutomated Scaffold Steps
The script performs 6 deterministic verification steps:
- Toolchain Verification: Confirms
dotnetCLI is available and reports the active SDK version. - CPM & Global Props Validation: Ensures
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>,<Nullable>enable</Nullable>, and<TreatWarningsAsErrors>true</TreatWarningsAsErrors>. - Clean Architecture Layer Scaffolding: Generates
Domain/,Application/,Infrastructure/, andEndpoints/directories and the C# project file (Cadence.Apps.<Service>.csproj) for all 18 services:execution,designer,gateway,ctms,etmf,eisf,quality,safety,interop,notifications,econsent,org,payments,tickets,fileshare,imaging,knowledge,ai_gateway.
- Solution Binding: Binds all core packages (
Packages/), microservices (Apps/), and test suites (Tests/) intoCadence.sln. - Python
uvWorkspace Isolation: Ensures that newly scaffolded pure .NET projects do not breakuvworkspace resolution inpyproject.toml. - Solution Build Verification: Executes
dotnet build Cadence.sln --no-incrementalto ensure zero compilation or Roslyn analyzer errors.
4. Scaffold Layout Structure
text
Cadence.sln
├── Solution Items/
│ ├── .editorconfig
│ ├── Directory.Build.props
│ ├── Directory.Packages.props
│ └── global.json
├── Packages/
│ ├── Cadence.Core.Domain (packages/engine_core/src/Cadence.Core.Domain.csproj)
│ ├── Cadence.Security (packages/security/src/Cadence.Security.csproj)
│ ├── Cadence.Contracts (packages/contracts/src/Cadence.Contracts.csproj)
│ ├── Cadence.Database (packages/database/src/Cadence.Database.csproj)
│ ├── Cadence.Testing (packages/testing/src/Cadence.Testing.csproj)
│ └── Cadence.Cli (packages/cli/src/Cadence.Cli.csproj)
├── Apps/
│ ├── Cadence.Apps.Gateway (apps/gateway/src/Cadence.Apps.Gateway.csproj)
│ ├── Cadence.Apps.Designer (apps/designer/src/Cadence.Apps.Designer.csproj)
│ ├── Cadence.Apps.Execution (apps/execution/src/Cadence.Apps.Execution.csproj)
│ ├── Cadence.Apps.Ctms (apps/ctms/src/Cadence.Apps.Ctms.csproj)
│ ├── Cadence.Apps.Etmf (apps/etmf/src/Cadence.Apps.Etmf.csproj)
│ └── ... (remaining 13 microservices)
└── Tests/
├── Cadence.UnitTests (tests/Cadence.UnitTests.csproj)
└── Cadence.ArchitectureTests (tests/Cadence.ArchitectureTests.csproj)5. Next Steps: Service Transcription
Once a service is scaffolded, follow the 6-Step Service Transcription SOP documented in MIGRATION_WORKFLOW.md:
- Step 1: Domain: Transcribe entities and aggregate roots into
Domain/. - Step 2: Persistence: Configure EF Core Fluent API and GxP interceptor in
Infrastructure/. - Step 3: Application: Implement typed application services and FluentValidation in
Application/. - Step 4: Endpoints: Define Minimal API route groups and filters in
Endpoints/. - Step 5: Testing: Author xUnit tests with
[GxPRequirement]attributes intests/. - Step 6: GxP Sync: Run
pnpm cadence gxp syncto validate the requirement tags and results. It writes a preview only; never commit the RTM or IQ/OQ/PQ report on a feature branch (ADR-2532).