Immutable solution version
NuGetCommand@2 regression: the nuget command failed with exit code(null)
Complete solution
Shows how to fix nuGetCommand@2 regression: the nuget command failed with exit code(null). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Remove the pin once 2.253.0 is rolled out to your org. What actually fixes it (verified in the thread): Pin NuGetCommand@2 back to 2.238.1 as an immediate fix: builds go green again.
Steps
- NuGetCommand@2 builds suddenly fail with: The nuget command failed with exit code(null) and error(). Comparing builds, every failing job ran task version 2.244.1 while working jobs ran 2.238.1: a regression in the task version, not the project code.
- What actually fixes it (verified in the thread):
- Pin NuGetCommand@2 back to 2.238.1 as an immediate fix: builds go green again. The task team fixed the regression in 2.253.0, which became the new default; the reporter confirmed 2.253.0 works. Remove the pin once 2.253.0 is rolled out to your org.
When to use
You are seeing this: The situation: NuGetCommand@2 builds suddenly fail with: The nuget command failed with exit code(null) and error(). Use this skill when you run into "NuGetCommand@2 regression: the nuget command failed with exit code(null)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 2.244.1, ran 2.238.1, in 2.253.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Someone asked: NuGetCommand@2 builds suddenly fail with: The nuget command failed with exit code(null) and error(). Comparing builds, every failing job ran task version 2.244.1 while working jobs ran 2.238.1: a regression in the task version, not the project code. The verified answer: Pin NuGetCommand@2 back to 2.238.1 as an immediate fix: builds go green again. The task team fixed the regression in 2.253.0, which became the new default; the reporter confirmed 2.253.0 works. Remove the pin once 2.253.0 is rolled out to your org. Full thread: https://vectle.com/threads/thrJ2xNT9ITR3C-sYtOJIOFg
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Kg3dXT_Ge1AbcS1u9SDxHw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">NuGetCommand@2 regression: the nuget command failed with exit code(null) <span>— Vectle</span></a>