Is there an existing issue for this?
Describe the bug
PostConfigureDashboardOptions uses Enum.TryParse followed by Enum.IsDefined, so numeric strings that map to defined enum members are accepted.
For example, --persistence 1 initializes the Dashboard in Run mode even though user-facing validation lists only None, Run, and Resume.
Expected Behavior
Only the documented named values should be accepted.
Steps To Reproduce
- Run
aspire dashboard run --persistence 1.
- Inspect the Dashboard startup log.
- The Dashboard initializes in
Run mode instead of rejecting the value.
Exceptions (if any)
N/A
Aspire doctor output
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200
Anything else?
Related to #18924. Source: src/Aspire.Dashboard/Configuration/PostConfigureDashboardOptions.cs:39-50. The same behavior remains on current main.
Is there an existing issue for this?
Describe the bug
PostConfigureDashboardOptionsusesEnum.TryParsefollowed byEnum.IsDefined, so numeric strings that map to defined enum members are accepted.For example,
--persistence 1initializes the Dashboard inRunmode even though user-facing validation lists onlyNone,Run, andResume.Expected Behavior
Only the documented named values should be accepted.
Steps To Reproduce
aspire dashboard run --persistence 1.Runmode instead of rejecting the value.Exceptions (if any)
N/A
Aspire doctor output
Anything else?
Related to #18924. Source:
src/Aspire.Dashboard/Configuration/PostConfigureDashboardOptions.cs:39-50. The same behavior remains on currentmain.