Open EugeneAzhogin opened 5 years ago
I'm having the same issue. @EugeneAzhogin , what did you end up doing given this issue?
As a workaround you can start code generator in the projects folder and give relative path to the nswag document.
cd /home/myproject
dotnet "/root/.nuget/packages/nswag.msbuild/13.1.2/build/../tools/NetCore30/dotnet-nswag.dll" run "./extsrv.nswag"
This also works with msbuils Execs task:
<Exec
Command="...."
WorkingDirectory="/home/myproject"
ConsoleToMsBuild="true"
IgnoreExitCode="true" />
It will work from frontend node modules. node_modules/.bin/nswag run nswag/service.config.nswag
Will this ever be fixed?
@amithkumarg well will you ever fix this?
I am generate Client with nswag command line tool in MSBuild. It ignores argument of input nswag-file.
So, command
dotnet "/root/.nuget/packages/nswag.msbuild/13.1.2/build/../tools/NetCore30/dotnet-nswag.dll" run "/home/myproject/extsrv.nswag"
prints in output
Current directory does not contain any .nswag files.
In source code https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.Commands/Commands/Document/ExecuteDocumentCommand.cs I see following line
if (!string.IsNullOrEmpty(Input) && !Input.StartsWith("/") && !Input.StartsWith("-"))
I suppose, this command cannot be used in linux.