Could not execute dotnet swagger command
Asked Answered
S

1

9

I'm trying to execute the dotnet swagger command but received an error message:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-swagger does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
  • The swashbuckle.aspnetcore.cli (5.0.0) tool is installed globally.
  • The PATH to the tools is set.

What am I doing wrong and how can I fix it?

Sherry answered 20/1, 2020 at 9:9 Comment(2)
What does running dotnet tool list and dotnet tool list -g show?Cerelia
@Kevin Smith dotnet tool list shows an empty list, dotnet tool list -g shows the installed swashbuckle.aspnetcore.cli toolSherry
A
12

The command is no longer dotnet swagger. It is swagger only.

enter image description here

Adrial answered 20/1, 2020 at 9:30 Comment(1)
What if your projects executes in the build the dotnet swagger command and the CI tool crashes if you try to execute swagger directly?Contradict

© 2022 - 2024 — McMap. All rights reserved.