-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: nswag.js try detect the runtime version from config file #5302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RicoSuter
merged 1 commit into
RicoSuter:master
from
dylanvdmerwe:nswag-npm-detect-runtime
Nov 20, 2025
Merged
fix: nswag.js try detect the runtime version from config file #5302
RicoSuter
merged 1 commit into
RicoSuter:master
from
dylanvdmerwe:nswag-npm-detect-runtime
Nov 20, 2025
+38
−5
Conversation
This file contains hidden or 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
Owner
|
v14.6.3 |
This was referenced Nov 21, 2025
Closed
github-actions bot
pushed a commit
to EelcoLos/nx-tinkering
that referenced
this pull request
Nov 24, 2025
Updated [NSwag.Core](https://github.com/RicoSuter/NSwag) from 14.6.2 to 14.6.3. <details> <summary>Release notes</summary> _Sourced from [NSwag.Core's releases](https://github.com/RicoSuter/NSwag/releases)._ ## 14.6.3 ## What's Changed * Using final .NET 10 libraries/SDK and minor .NET 10 fixes (v14.6.3) by @RicoSuter in RicoSuter/NSwag#5307 * Updated packages for CVE-2025-55315 by @erjdev in RicoSuter/NSwag#5299 * fix: nswag.js try detect the runtime version from config file by @dylanvdmerwe in RicoSuter/NSwag#5302 ## New Contributors * @erjdev made their first contribution in RicoSuter/NSwag#5299 * @dylanvdmerwe made their first contribution in RicoSuter/NSwag#5302 **Full Changelog**: RicoSuter/NSwag@v14.6.2...v14.6.3 Commits viewable in [compare view](RicoSuter/NSwag@v14.6.2...v14.6.3). </details> Updated [NSwag.Core.Yaml](https://github.com/RicoSuter/NSwag) from 14.6.2 to 14.6.3. <details> <summary>Release notes</summary> _Sourced from [NSwag.Core.Yaml's releases](https://github.com/RicoSuter/NSwag/releases)._ ## 14.6.3 ## What's Changed * Using final .NET 10 libraries/SDK and minor .NET 10 fixes (v14.6.3) by @RicoSuter in RicoSuter/NSwag#5307 * Updated packages for CVE-2025-55315 by @erjdev in RicoSuter/NSwag#5299 * fix: nswag.js try detect the runtime version from config file by @dylanvdmerwe in RicoSuter/NSwag#5302 ## New Contributors * @erjdev made their first contribution in RicoSuter/NSwag#5299 * @dylanvdmerwe made their first contribution in RicoSuter/NSwag#5302 **Full Changelog**: RicoSuter/NSwag@v14.6.2...v14.6.3 Commits viewable in [compare view](RicoSuter/NSwag@v14.6.2...v14.6.3). </details> Updated [NSwag.Generation.AspNetCore](https://github.com/RicoSuter/NSwag) from 14.6.2 to 14.6.3. <details> <summary>Release notes</summary> _Sourced from [NSwag.Generation.AspNetCore's releases](https://github.com/RicoSuter/NSwag/releases)._ ## 14.6.3 ## What's Changed * Using final .NET 10 libraries/SDK and minor .NET 10 fixes (v14.6.3) by @RicoSuter in RicoSuter/NSwag#5307 * Updated packages for CVE-2025-55315 by @erjdev in RicoSuter/NSwag#5299 * fix: nswag.js try detect the runtime version from config file by @dylanvdmerwe in RicoSuter/NSwag#5302 ## New Contributors * @erjdev made their first contribution in RicoSuter/NSwag#5299 * @dylanvdmerwe made their first contribution in RicoSuter/NSwag#5302 **Full Changelog**: RicoSuter/NSwag@v14.6.2...v14.6.3 Commits viewable in [compare view](RicoSuter/NSwag@v14.6.2...v14.6.3). </details> Updated [NSwag.MSBuild](https://github.com/RicoSuter/NSwag) from 14.6.2 to 14.6.3. <details> <summary>Release notes</summary> _Sourced from [NSwag.MSBuild's releases](https://github.com/RicoSuter/NSwag/releases)._ ## 14.6.3 ## What's Changed * Using final .NET 10 libraries/SDK and minor .NET 10 fixes (v14.6.3) by @RicoSuter in RicoSuter/NSwag#5307 * Updated packages for CVE-2025-55315 by @erjdev in RicoSuter/NSwag#5299 * fix: nswag.js try detect the runtime version from config file by @dylanvdmerwe in RicoSuter/NSwag#5302 ## New Contributors * @erjdev made their first contribution in RicoSuter/NSwag#5299 * @dylanvdmerwe made their first contribution in RicoSuter/NSwag#5302 **Full Changelog**: RicoSuter/NSwag@v14.6.2...v14.6.3 Commits viewable in [compare view](RicoSuter/NSwag@v14.6.2...v14.6.3). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Nov 24, 2025
Closed
This was referenced Dec 1, 2025
Closed
Closed
This was referenced Dec 9, 2025
Closed
Merged
Closed
This was referenced Dec 16, 2025
Closed
Closed
This was referenced Jan 1, 2026
This was referenced Jan 11, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Often we have issues where the nswag.json file will specify the "runtime" to something other than "net80". In my case "net90" and now going forward "net100".
With NSwag installed with NPM, either as a global package or as a devDependencies in package.json. In my case "nswag" is listed as a devDependency in package.json.
If you then execute the NSwag NPM script (
nswag run nswag.json), the js script sets thedefaultCoreVersiontoNet80. This will load the NSwag command line tool for .NET Core Net80.But because the runtime specified in the config file is different (net90 in my case) you will get this error:
You'll see the incorrect binary was used (Net80 instead of Net90)
If you then try run
npm run nswag.json /runtime:Net90you will get this error:What this fix does is attempt to set
defaultCoreVersionfrom the runtime specified in the json configuration file (if it exists).In the case where the config file sets 'runtime': 'net90', and you run
nswag run nswag.json,defaultCoreVersionis set toNet90for you loading the appropriate binary:If runtime is not set in the config file, the original
defaultCoreVersionofNet80will be used.Tested on latest 14.6.2.