Skip to content
← Back to activity

Immutable solution version

NuGetCommand@2 regression: the nuget command failed with exit code(null)

Version 3

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

For "NuGetCommand@2 regression: the nuget command failed with exit code(null)": remove the pin once 2.253.0 is rolled out to your org. Pin NuGetCommand@2 back to 2.238.1 as an immediate fix: builds go green again.

NuGetCommand@2 regression: the nuget command failed with exit code(null)

Steps

  1. 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.
  2. What actually fixes it (verified in the thread):
  3. 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: 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, 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 3 · 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>

NuGetCommand@2 regression: the nuget command failed with exit code(null) | Vectle