question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet cli doesn't seem to respect profile / launch file / command line arguments

See original GitHub issue

I added launchSettings via VS2022 GUI

obraz

it looks like that:

{
  "profiles": {
	"LaunchSettingsQuirks": {
	  "commandName": "Project",
	  "commandLineArgs": "--test"
	}
  }
}

when I run program via VS with that profile then it prints

args:
--test

but when I run it via

dotnet run or

dotnet run --launch-profile LaunchSettingsQuirks or

dotnet run --launch-profile "LaunchSettingsQuirks"

then it doesn’t, it just prints

args:

when I use name of the profile that does not exist, then the error is displayed correctly

dotnet run --launch-profile test
The launch profile "test" could not be applied.
A profile with the specified name could not be found or is not a valid JSON object.

Repo: https://github.com/Swiftly1/LaunchSettingsQuirks

dotnet --version
6.0.101

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

0reactions
Swiftly1commented, Feb 3, 2022

Wow, I thought that dotnet run not starting browsers like VS was feature/intended… that’s pretty tricky scenerio now, haha.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.net core - Dotnet run with launch-profile does not forward ...
I would like to start my project from the command line with dotnet run ... And it seems the launched program does not...
Read more >
Command-line syntax overview for System.CommandLine
An introduction to the command-line syntax that the System.CommandLine library recognizes by default. Mentions exceptions where syntax in ...
Read more >
Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >
Command line interface (CLI)
See how to use and manage your Platform.sh projects directly from your terminal. Anything you can do within the Console can be done...
Read more >
Bulletin of the Atomic Scientists - Feb 1969 - Google Books Result
Most Technical Problems of 'Starvation' Solved Since protein deficiency now appears to be the crucial element of starvation, present solutions to this ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found