# Build Instructions — Local Dev Master/Slave Setup ## Prerequisites - **Build Tool**: .NET 10 SDK - **Dependencies**: NuGet packages restore automatically on build (no new external dependencies introduced by this feature) - **Environment Variables**: None required to build (runtime config is via `appsettings.local.json`, see below) - **System Requirements**: Same as the rest of the repository — no new system requirements ## Build Steps ### 1. Restore & Build ```powershell dotnet build SlpModularCms.sln ``` ### 2. Verify Build Success - **Expected Output**: `Build succeeded.` with 0 errors (NuGet advisory warnings for `Microsoft.OpenApi` and a few `NU1510`/prune warnings are pre-existing and unrelated to this feature). - **Build Artifacts**: `src/SlpModularCms.Api/bin/`, `src/SlpModularCms.Api.Slave/bin/` (new), plus all existing project outputs. - **Common Warnings**: NU1903 (Microsoft.OpenApi advisory) and NU1510 (package pruning) appear across multiple projects — pre-existing, not introduced by this feature. ### Actual Result (this session) Ran `dotnet build SlpModularCms.sln` — **Build succeeded**, 0 errors. ## Troubleshooting ### Build Fails with `CS0246` in `SlpModularCms.Core/Hosting/*.cs` - **Cause**: `SlpModularCms.Core` is a plain `Microsoft.NET.Sdk` project (not `Sdk.Web`), so ASP.NET Core implicit usings (`Microsoft.Extensions.DependencyInjection`, `Microsoft.Extensions.Configuration`, `Microsoft.AspNetCore.Builder`, `Microsoft.AspNetCore.Http`) aren't automatically available like they are in `SlpModularCms.Api`. - **Solution**: Already fixed during Code Generation — explicit `using` statements were added to `ServiceCollectionExtensions.cs`. If this recurs after further edits, add the missing explicit `using`. ### `SlpModularCms.Api.Slave` fails to start with a SQL connection error - **Cause**: Missing `src/SlpModularCms.Api.Slave/appsettings.local.json` (gitignored, must be created locally per developer). - **Solution**: Copy `appsettings.local.json.example` to `appsettings.local.json` and fill in your local SQL Server credentials, using a **different** `Database=` name than the master instance (e.g. `SlpModularCmsSlave`).