
Aspire Configuration
This keeps your Aspire apps production-ready by forcing everything through explicit environment variables instead of leaning on service discovery magic. You wire up resources like Postgres or MinIO in the AppHost using WithEnvironment calls that map to config keys, then your actual app code just reads IOptions or Configuration like any normal .NET service. No Aspire client packages pollute your application projects. The payoff is that your dev setup looks exactly like what you'll deploy, every setting can be represented as an env var in Kubernetes or wherever, and you can spin up integration tests without mysterious orchestration leaking into your domain logic. It's opinionated but honest about keeping infrastructure concerns in one place.
- skills.sh installs
- 487
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aaronontheweb/dotnet-skills --skill aspire-configuration --agent claude-codeInstalls into .claude/skills of the current project.
Files
Aspire Configuration
When to Use This Skill
Use this skill when:
- Wiring AppHost resources to application configuration in Aspire-based repos
- Ensuring production configuration is transparent and portable outside of Aspire
- Avoiding Aspire client/service-discovery packages inside application code
- Designing feature toggles for dev/test without changing app code paths
Core Principles
-
AppHost owns Aspire infrastructure packages
- Aspire Hosting packages belong in AppHost only.
- App projects should not reference Aspire client/service-discovery packages.
-
Explicit configuration only
- AppHost must translate resource outputs into explicit config keys (env vars).
- App code binds to
IOptions<T>orConfigurationonly.
-
Production parity and transparency
- Every value injected by AppHost must be representable in production as env vars or config files without Aspire.
- Avoid opaque service discovery and implicit configuration.
Configuration Flow
AppHost resource -> WithEnvironment(...) -> app config keys -> IOptions<T> in app
Sponsors
Details
- Repository
- github.com/aaronontheweb/dotnet-skills
- Categories
- Sales & Marketing, .NET & C#
- First seen
- Jun 3, 2026
More from aaronontheweb/dotnet-skills
All 34- Snapshot Testing484
- Dotnet Devcert Trust457
- Skills Index Snippets456
- Playwright Ci Caching455
- Akka Net Best Practices451
- Mailpit Integration443
- Verify Email Snapshots436
- Akka Hosting Actor Patterns434
- Akka Net Testing Patterns431
- OpenTelemetry NET Instrumentation431
- Akka Net Management430
- Akka Net Aspire Configuration415
- Marketplace Publishing408
- Modern Csharp Coding Standards2.3K
- Csharp Concurrency Patterns1.6K
- Efcore Patterns1.6K
- Dependency Injection Patterns703
- Database Performance700
- Dotnet Project Structure692
- Api Design690
- Type Design Performance684
- Ilspy Decompile640
- Package Management613
- Microsoft Extensions Configuration609