I'm getting the subject error message while using the sample MS PowerShell script from the article Generating API clients using AutoRest when the following command line
dotnet swagger "tofile" --output "../../res/swagger.json" "../Sample.Api/bin/Debug/netcoreapp2.1/Sample.Api.dll" v1
is executed. Solution?
FYI: Swashbuckle.AspNetCore.Cli entry source code is located here: Swashbuckle.AspNetCore/src/Swashbuckle.AspNetCore.Cli/Program.cs
UPDATE
I should have posted the full text of runtime error message - here it is:
At C:\Tests\Swashbuckle\build.ps1:8 char:1
+ dotnet swagger "tofile" --output "../../res/swagger.json" "../Sample. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.OpenApi,
Version=1.1.1.0, Culture=neutral, PublicKeyToken=3f5743946376f042'.
The system cannot find the file specified.
at Swashbuckle.AspNetCore.Cli.Program.<>c.<Main>b__0_3(IDictionary`2 namedArgs)
at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable`1 args)
at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable`1 args)
at Swashbuckle.AspNetCore.Cli.Program.Main(String[] args)