Use new 'dotnet run' 9.1 options for launching projects #7112
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone
Is there an existing issue for this?
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 profilesSee 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 whatdotnet
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
The text was updated successfully, but these errors were encountered: