title: Is there a way to force NuGet to restore the latest package version during pipeline execution?
body: <p>We are using an internal NuGet feed in our Azure DevOps environment to host many different packages, which are consumed in many different projects. I would like to configure the pipeline so that whenever an internal package is referenced, it is always resolved to the latest version. All of the internal references are configured with wildcards in the PackageReference tag of the .vbproj file, like so:</p>
  <pre><code>&lt;PackageReference Include=&quot;MyPackageName&quot; Version=&quot;*&quot; /&gt;
  </code></pre>
  <p>And the restore command in the YAML file is configured like so:</p>
  <pre><code>- task: NuGetCommand@2
      condition: and(succeeded(), eq(variables['ModifiedProject'], 'true'))
      displayName: 'NuGet restore'
      inputs:
        command: 'restore'
        restoreSolution: '$(ModifiedProject.Directory)/$(ModifiedProject.Solution)'
        feedsToUse: 'select'
        vstsFeed: '[guid]/[guid]'
        noCache: true
  </code></pre>
  <p>The projects build successfully, but they still end up using the oldest version of the package instead of restoring the newest version. Is there a way to force the restore task to default to the newest package version?</p>