Skip to content

Conversation

@ptasev
Copy link
Contributor

@ptasev ptasev commented Jan 2, 2026

Running the following command results in the following exception:

nswag openapi2tsclient /runtime:Net100 /input:../openapi.json /template:angular /InjectionTokenType:InjectionToken /HttpClass:HttpClient /RxJsVersion:6.0 /operationGenerationMode:MultipleClientsFromFirstTagAndOperationId /output:src/service.ts

NConsole.UnusedArgumentException: Unrecognised arguments are present: [Used arguments (7) != Provided arguments (8) -> Check [/runtime:Net100]]
   at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input) in /_/src/NSwag.Commands/NConsole/CommandLineProcessor.cs:line 181
   at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input) in /_/src/NSwag.Commands/NConsole/CommandLineProcessor.cs:line 120

This commit fixes the problem by removing the runtime argument before passing the args to the dotnet console app. It matches functionality with what the comment says it should be doing on line 63.

@RicoSuter RicoSuter merged commit 2a5ca6e into RicoSuter:master Jan 3, 2026
3 checks passed
@ptasev ptasev deleted the patch-1 branch January 3, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants