microsoft / undocked

Simplifies the process of building internal, native Windows projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix Warning: The 'Restore NuGet Packages' option is deprecated.

nibanks opened this issue · comments

OneBranch pipeline is spitting out the following:

##[warning]The 'Restore NuGet Packages' option is deprecated. To restore NuGet packages in your build, add a NuGet Tool Installer task to your build definition.

This corresponds to:

  - task: VSBuild@1
    displayName: Build
    target: windows_build_container
    inputs:
      solution: ${{ parameters.sln }}
      platform: $(ob_build_platform)
      configuration: $(ob_build_config)
      maximumCpuCount: true
      restoreNugetPackages: ${{ parameters.restoreNugetPackages }}  <===== DEPRECATED
      msbuildArgs: '-p:UndockedOfficial=${{ parameters.nativeCompiler }} -p:UndockedBuildId=$(Build.BuildId) ${{ parameters.msbuildArgs }}'

Looks like we need to update to NuGetCommand@2: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/nuget-command-v2?view=azure-pipelines