Skip to content

Instantly share code, notes, and snippets.

@alexjamesbrown alexjamesbrown/error.txt Secret
Last active Nov 27, 2019

Embed
What would you like to do?
NSwag Error Before / After fix
Done executing command. Exit Code: 1.
CompanyName.Supplier.Api.UnitTests -> C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.UnitTests\bin\Debug\netcoreapp2.2\CompanyName.Supplier.Api.UnitTests.dll
CompanyName.Supplier.Api.FunctionalTests -> C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.FunctionalTests\bin\Debug\netcoreapp2.2\CompanyName.Supplier.Api.FunctionalTests.dll
System.InvalidOperationException: Unable to retrieve project metadata. Ensure it's an MSBuild-based .NET Core project.If you're using custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option.
at NSwag.Commands.Generation.AspNetCore.ProjectMetadata.GetProjectMetadata(String file, String buildExtensionsDir, String framework, String configuration, String runtime, Boolean noBuild, IConsoleHost console) in C:\projects\nswag\src\NSwag.Commands\Commands\Generation\AspNetCore\ProjectMetadata.cs:line 143
at NSwag.Commands.Generation.AspNetCore.AspNetCoreToSwaggerCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in C:\projects\nswag\src\NSwag.Commands\Commands\Generation\AspNetCore\AspNetCoreToOpenApiCommand.cs:line 103
at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input)
at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input)
at NConsole.CommandLineProcessor.Process(String[] args, Object input)
at NSwag.Commands.NSwagCommandProcessor.Process(String[] args) in C:\projects\nswag\src\NSwag.Commands\NSwagCommandProcessor.cs:line 56
C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.Client\CompanyName.Supplier.Api.Client.csproj(20,5): error MSB3073: The command "dotnet "C:\Users\Alex Brown\.nuget\packages\nswag.msbuild\13.1.2\build\../tools/NetCore22/dotnet-nswag.dll" aspnetcore2openapi /project:C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.Client\/../CompanyName.Supplier.Api/CompanyName.Supplier.Api.csproj /output:swagger.json -no-build" exited with code -1.
Build FAILED.
MSBUILD : error MSB1009: Project file does not exist. [C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.Client\CompanyName.Supplier.Api.Client.csproj]
C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.Client\CompanyName.Supplier.Api.Client.csproj(20,5): error MSB3073: The command "dotnet "C:\Users\Alex Brown\.nuget\packages\nswag.msbuild\13.1.2\build\../tools/NetCore22/dotnet-nswag.dll" aspnetcore2openapi /project:C:\Users\Alex Brown\my-project\CompanyName.Supplier.Api.Client\/../CompanyName.Supplier.Api/CompanyName.Supplier.Api.csproj /output:swagger.json -no-build" exited with code -1.
<Exec Command="$(NSwagExe_Core22) aspnetcore2openapi /project:&quot;$(ProjectDir)/../$(ApiProjName)/$(ApiProjName).csproj&quot; /output:swagger.json -no-build" />
<Exec Command="$(NSwagExe_Core22) aspnetcore2openapi /project:$(ProjectDir)\..\$(ApiProjName)\$(ApiProjName).csproj /output:swagger.json " />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.