以“ 无法找到版本” 软件包 NuGet Recovering 失败 ? 检查您的 NuGetToolsInstaller 版本 !

2026年8月17日3 次浏览来源:Dev.to阅读原文

正文保留英文原文(机翻易破坏代码与排版),标题/摘要已提供中文

The Problem In one of our Azure DevOps pipelines, nuget restore suddenly started failing with an error stating, in essence, that the requested package could not be found in the referenced version.

The task referencing the package hadn't changed — yet the restore stage kept failing.

At first glance, this looks like an issue with the package source, some caching effect, or a broken .nuspec/lockfile.

It wasn't.

The Root Cause The actual culprit was the version of the NuGetToolInstaller@1 task itself.

The pipeline had NuGet pinned to version 6.12.2.

The Fix Bump the versionSpec in the NuGetToolInstaller@1 task from 6.12.2 to 7.9.0: That's it.

After the update, nuget restore ran through cleanly again.

分享