dotnet serve -d dist\demo1 not working in .NET 6
See original GitHub issueDescribe the bug
The -d
command option usage is not what I expected.
To Reproduce Steps to reproduce the behavior:
-
Using this version (run
dotnet serve --version
):1.8.34+6a96cbef9da7bfc86f6424f2ee499819cc617f7a
-
Run these arguments ‘…’
This command is not working.
dotnet serve -d dist\demo1
This is okay.
dotnet serve --directory dist\demo1
This is okay too.
dotnet serve -d=dist\demo1
-
See error
Expected behavior
This command should working.
```sh
dotnet serve -d dist\demo1
```
Screenshots If applicable, add screenshots to help explain your problem.
Specify --help for a list of available options and commands.
Unexpected error: McMaster.Extensions.CommandLineUtils.UnrecognizedCommandParsingException: Unrecognized command or argument 'dist\demo1'
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessUnexpectedArg(String argTypeName, String argValue)
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessCommandOrParameter(CommandOrParameterArgument arg)
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessNext()
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.Process()
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Parse(String[] args)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at McMaster.DotNet.Serve.Program.Run(String[] args) in D:\a\dotnet-serve\dotnet-serve\src\dotnet-serve\Program.cs:line 46
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
dotnet run not working after update to dotnet 6
To fix this issue, run the following commands 'dotnet dev-certs https --clean' and 'dotnet dev-certs https' to remove all existing ASP.NET Core ...
Read more >Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >NETSDK1045: The current .NET SDK does not support ...
Open the Solution Properties window (ctrl-click the solution in the Solution window and select Properties), select Build - General, and uncheck ...
Read more >.NET and Visual Studio Code
Open a terminal/command prompt and navigate to the folder in which you'd like to create the app. Enter the following command in the...
Read more >Understanding Dependency Injection in .NET Core
This tutorial will try to clarify the various Dependency Injection concepts and will introduce you to the support provided by .NET Core. The...
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 Free
Top 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
@doggy8088 I’ll need your help to make some noise to get the attention of the devs at Microsoft. This looks like a regression in .NET itself. I used to be one so know how many pings and issues they receive from github.
In the meantime, try to workaround this by calling
dotnet-serve
instead ofdotnet serve
.https://github.com/dotnet/sdk/issues/16120