Search code examples
asp.net-coreswaggerswashbuckledotnet-tool

Could not execute dotnet swagger command


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?


Solution

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

    enter image description here