1

NuGet restore failed to restore packages on build pipeline (windows-latest). Had to pin the build agent to windows-2019 to get it working again.

  • 2
    What exactly is your question? – jessehouwing Feb 09 '22 at 10:00
  • Package Microsoft.Extensions.Logging.Abstractions 3.1.21 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.Extensions.Logging.Abstractions 3.1.21 supports: netstandard2.0 (.NETStandard,Version=v2.0) Package Microsoft.Extensions.DependencyInjection.Abstractions 3.1.21 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.Extensions.DependencyInjection.Abstractions 3.1.21 supports: netstandard2.0 (.NETStandard,Version=v2.0) One or more packages are incompatible with .NETCoreApp,Version=v3.1. – Jacques Oosthuizen Feb 09 '22 at 10:24
  • The question is, why is this an issue? This should not be an error. – Jacques Oosthuizen Feb 09 '22 at 10:26
  • The issue seems only to be related to Build Pipeline Task NuGetCommand@2: restore. – Jacques Oosthuizen Feb 09 '22 at 11:15
  • Do you have an explicit UseDotNet task in your workflow to set the version to build against? – jessehouwing Feb 09 '22 at 11:36
  • Have you tried the `Dotnet` task with the restore command? – jessehouwing Feb 09 '22 at 11:36
  • This morning it worked and now not anymore, so this must be a new issue. – Jacques Oosthuizen Feb 09 '22 at 11:54
  • It's possible the rollout of the changeover from windows-2019 to windows-2022 for the windows-latest label went live on your account yesterday. – jessehouwing Feb 09 '22 at 12:01
  • This changes the default versions of visual studio, MSBuild, dotnet core, x86 to x64 and a few other things that can cause this issue. – jessehouwing Feb 09 '22 at 12:02

0 Answers0