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 serve -d dist\demo1 not working in .NET 6

See original GitHub issue

Describe the bug

The -d command option usage is not what I expected.

To Reproduce Steps to reproduce the behavior:

  1. Using this version (run dotnet serve --version): 1.8.34+6a96cbef9da7bfc86f6424f2ee499819cc617f7a

  2. 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
    
  3. 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

image

Additional context Add any other context about the problem here.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
natemcmastercommented, Jun 18, 2021

@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 of dotnet serve.

Read more comments on GitHub >

github_iconTop 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 >

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