Aspire CLI: Consider adding a --release switch, or equivalent to compile in Release mode
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
From a discord chat with @mitchdenny
I would like to be able to do `aspire run --release` to compile the solution in release mode with no intent to attach any debuggers. Aspire is great to orchestrate demos as well as debug/development, and when you're doing ML stuff, you don't want to demo in debug mode. Often a demo is being executed with Teams running with screen sharing, so Release optimizations are welcome to improve performance.
Orleans, in particular, runs like it's given up on life altogether in debug mode, particularly when there's a debugger attached. I know that launching aspire cli doesn't attach a debugger.
I don't want to publish my demo elsewhere because i have a very expensive laptop with an NPU.
### Describe the solution you'd like
> aspire run --release
solution is compiled in release mode, apphost launched. profit!
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing the `aspire run` entry point and how it compiles the solution before launching the apphost. Determine how a `--release` or equivalent option should select Release mode without attaching debuggers, then verify that `aspire run --release` launches the apphost with the expected optimized build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100