Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
In .NET 9.1 dotnet run
gains two new launch options that would be useful for launching projects in the context of an Aspire app:
-
-e
causes an environment variable to be applied to the application being launched, but NOT to the targets participating in the application build (unlike the oldenv:
option). -
--no-launch-profile-arguments
allows to ignore invocation arguments in launch profiles
See dotnet/sdk#45844 for an example how these options are used in the context of dotnet watch
Describe the solution you'd like
Ideally these options would be used to launch projects when Aspire app host is launched from command line via dotnet run
. The problem is they are only available in .NET 9.1 and newer. So either Aspire app host needs to somehow learn what dotnet
CLI version is available and change the launch options used accordingly, or start using these new launch options only after .NET 9.1 or later becomes a required dependency for Aspire.
Additional context
@DamianEdwards FYI