Local Development¶
Run your application and its dependencies through the Aspire AppHost. The dashboard shows resource status and local telemetry; deployed infrastructure follows the deployment workflow, not the local orchestration process.
Prerequisites¶
Use the SDK versions in Version Compatibility, install the SAIF CLI, and install the Aspire CLI.
Docker Desktop provisioning¶
Docker Desktop requires IT approval on SAIF developer machines:
- Request membership in the Active Directory
DesktopDocker_Usersgroup through ServiceNow. - Install Docker Desktop from Software Center.
- Add your user to the developer machine's local
docker-usersgroup.
Start Docker Desktop before running container-based AppHost resources, including local mock services. Use Docker's documentation for the product's general setup and troubleshooting.
Setup¶
Install Production Templates¶
Follow Create projects with Forge templates for installation, template discovery, generation, and the publishing distinction between saif new and dotnet new. SAIF CLI installation owns NuGet feed access and saif doctor fix setup.
After generation, open the solution and launch its AppHost from your IDE to view the running resources in the Aspire dashboard.
Test Execution: Native Microsoft Testing Platform (MTP)¶
Generated repositories use native MTP, not the VSTest bridge. Follow Testing for the runner configuration, test command, coverage command, and requirements when adding a feature template to an older application.
Forge service defaults¶
Forge's AddServiceDefaults() and UseServiceDefaults() build on Aspire's service-defaults pattern. See the SAIF.Platform reference for the API surface and Aspire documentation for orchestration.
- CORS differs between local and deployed execution. In Development,
AddDefaultCors()recursively discovers origins from theServicesconfiguration section and allows methods, headers, and credentials for those origins. Outside Development it adds no default policy, andUseServiceDefaults()does not enable CORS. Configure your service's deployed policy explicitly rather than assuming local behavior carries over. These branches live inExtensions.cs. - Telemetry settings have one home. See Observability for wildcard instrumentation, sampling, export, and the
platform.*diagnostic tags. - The default cache is per-instance. Without
REDIS_CONNECTION_STRING,ConfigureDistributedCache()registers an in-memory cache, not shared infrastructure. Under scale-out, an instance without a cached OBO token needs its own token exchange; inspectsaif.authentication.token_cache.hitsandsaif.authentication.token_cache.missesrather than assuming another instance's cache applies. See How Authentication Works for token flows. A shared cache requires provisioning and an explicit configuration decision; the fallback alone does not supply it.
Service discovery: local to deployed¶
Keep logical resource names consistent between AppHost references and your client registration. Downstream API Calls owns the local-to-deployed name mapping, Front Door/APIM routing, private network, and PR-slot distinctions. Golden Path: Service Discovery shows the local WithReference() pattern.
Mock dependencies¶
Use API Mocking to choose local WireMock hosting, cloud-managed definitions, or recording. Use real endpoints separately when you need to verify an external provider's actual behavior.