What problem does it solve?
This Skill addresses the challenge of managing configuration in .NET Aspire applications, specifically when you need to ensure that application configuration is explicit, portable, and production-ready without embedding Aspire client packages directly into application code.
Core Features & Use Cases
- Explicit Configuration Mapping: Translates Aspire resource outputs (like database connection strings or service URLs) into explicit environment variables or configuration keys.
- Decoupled Application Code: Prevents application projects from depending on Aspire client or service discovery packages, promoting cleaner architecture and easier testing.
- Production Parity: Ensures that configuration injected by the AppHost can be easily replicated in production environments using standard configuration methods (environment variables, config files).
- Feature Toggles: Facilitates the management of feature toggles and test overrides through configuration, maintaining consistency across development, testing, and production.
- Use Case: Wire a PostgreSQL database and a MinIO blob storage service defined in your Aspire AppHost to your API project's
IOptions<T> configuration, ensuring the API only consumes these settings as standard configuration values.
Quick Start
Use the aspire-configuration skill to map the 'postgres' database resource to the 'ConnectionStrings__Postgres' configuration key in the 'api' project.