Closed aeslinger0 closed 2 months ago
NSwag is starting your app because it needs the openapi spec, which is dynamically generated from your controllers by NSwag from within your app. The "nobuild" option only relates to building your app, not running your app.
Got it. My biggest problem was that my deployment pipeline was failing due to a trying to connect to azure app configuration. I was able to get past my problems with my deployment pipeline by changing NSwag to only generate upon a rebuild of the project. That way, a dev can manually generate whenever they need to, and the pipeline will just ignore that step.
I use Azure App Configuration in my application. On app startup, I print all my config variables to the output pane. When generating the client upon building the project, I see them getting printed out during the NSwag generation via the post build event.
Why does NSwag appear to start the app in order to generate the client? I set "noBuild" to "true" in nswag.json, but this had no effect. I'm using version
14.0.7