dotnet run needs a way to pass through arguments starting with - or -- to the executable
See original GitHub issueI have an executable that supports a --foo
argument. However, running dotnet run --foo
does not work since the run command attempts to parse it (invalid option --foo
). We need a way to pass through any arguments that aren’t consumed by the run command to the executable being launched. This might also apply to the dotnet test
command.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:16 (4 by maintainers)
Top Results From Across the Web
dotnet run needs a way to pass through arguments starting ...
I have an executable that supports a --foo argument. However, running dotnet run --foo does not work since the run command attempts to...
Read more >dotnet run command - .NET CLI
Delimits arguments to dotnet run from arguments for the application being run. All arguments after this delimiter are passed to the ...
Read more >Pass command-line arguments to Startup class in ASP. ...
You should be able to use the AddCommandLine() extension. First install the Nuget package Microsoft.Extensions.Configuration.
Read more >Run and debug .NET executables without source code
Specify the path to the target executable. Optionally, specify program arguments that will be passed to the executable when the configuration is ...
Read more >How to start a service with certain start parameters on ...
It should give you a list of all the running services so you can get the actual service name. Then just use net...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1
“dotnet test” without passing through arguments cripples those of us wishing to port test frameworks to .NET Core.
Thnaks, but is this meant to work when launching from VS2017 using IISExpress Have below in launchSettings.json, from below UI in VS
"profiles": { "IIS Express": { "commandName": "IISExpress", "commandLineArgs": "-- -c \"D:/DATA/My Projects/2018/LIS/Config.xml\"", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } },
But
public static void Main(string[] args)
is always emptyHowever does work from command line with