-
-
Save alexjamesbrown/2eaf276afaf56bac680505a8038dc8f9 to your computer and use it in GitHub Desktop.
NSwag Error Before / After fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Exec Command="$(NSwagExe_Core22) aspnetcore2openapi /project:"$(ProjectDir)/../$(ApiProjName)/$(ApiProjName).csproj" /output:swagger.json -no-build" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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