-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Description
Description
When running aspire deploy on Linux (or macOS), the deployment state cache is not loaded properly due to a case mismatch in environment name handling between saving and loading.
Steps to Reproduce
- Run
aspire deployon Linux with default environment (Production) - Deploy completes and saves state to
~/.aspire/deployments/{sha}/production.json(lowercase) - Run
aspire deployagain - Cache is not loaded - Aspire looks for
Production.json(capitalized) instead ofproduction.json
Expected Behavior
The deployment state cache should be loaded automatically, reusing previous values for subscription, location, resource group, etc.
Actual Behavior
The cache is only loaded if you explicitly specify: aspire deploy --environment production (lowercase)
Without the flag, Aspire tries to find Production.json but the file is actually production.json, causing a silent failure on case-sensitive filesystems.
Root Cause
- Saving:
FileDeploymentStateManager.GetStatePath()uses.ToLowerInvariant()on the environment name - Loading:
DistributedApplicationBuilder.LoadDeploymentState()uses the rawEnvironmentNamewithout normalization
This inconsistency causes the issue on case-sensitive filesystems (Linux/macOS).
Impact
- Users on Linux/macOS cannot benefit from deployment state caching without knowing to use lowercase environment names
- This affects the deployment experience and requires re-entering deployment configuration on every run
Environment
- OS: Linux (case-sensitive filesystem)
- .NET Aspire version: Latest (main branch)
Metadata
Metadata
Assignees
Labels
No labels