You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If arguments are specified on the command line the arguments specified in launch profile are ignored. However, at least one argument must be specified to ignore the launch profile arguments. There is no way to ignore them and pass no arguments to the app.
This is rather a corner case but the ability is needed to implement Aspire spec correctly in dotnet watch.
Proposal
We propose to add --no-launch-profile-arguments option that forces dotnet run to ignore arguments specified in the launch profile.
Alternatively, we could interpret trailing -- that's not followed by any arguments on the command line as explicitly asking to pass 0 arguments to the app.
The text was updated successfully, but these errors were encountered:
Alternatively, we could interpret trailing -- that's not followed by any arguments on the command line as explicitly asking to pass 0 arguments to the app.
We shouldn't do this - it breaks expectations for the behavior of -- in POSIX applications. Having the explicit flag is definitely acceptable though.
baronfel
changed the title
[dotnet run] Now way to ignore arguments specified in launch profile
[dotnet run] No way to ignore arguments specified in launch profile
Jan 9, 2025
If arguments are specified on the command line the arguments specified in launch profile are ignored. However, at least one argument must be specified to ignore the launch profile arguments. There is no way to ignore them and pass no arguments to the app.
This is rather a corner case but the ability is needed to implement Aspire spec correctly in dotnet watch.
Proposal
We propose to add
--no-launch-profile-arguments
option that forces dotnet run to ignore arguments specified in the launch profile.Alternatively, we could interpret trailing
--
that's not followed by any arguments on the command line as explicitly asking to pass 0 arguments to the app.The text was updated successfully, but these errors were encountered: