title: dotnet build command fails while restoring packages
body: <p>I have a project that's building fine locally but the build in VSTS it fails in <code>dotnet build</code> command. The error looks very strange to me because I have no idea why a build command would try to restore packages again. Here's what the error looks like:</p>
  
  <blockquote>
    <p>2018-07-09T11:06:48.2541705Z   Retrying 'FindPackagesByIdAsync' for
    source
    '<a href="https://mycompany.pkgs.visualstudio.com/_packaging/5b9fd539-d653-4771-aa3c-6544d73b1234/nuget/v3/flat2/system.data.sqlclient/index.json" rel="nofollow noreferrer">https://mycompany.pkgs.visualstudio.com/_packaging/5b9fd539-d653-4771-aa3c-6544d73b1234/nuget/v3/flat2/system.data.sqlclient/index.json</a>'.
    2018-07-09T11:06:48.2562315Z   Response status code does not indicate
    success: 401 (Unauthorized).</p>
  </blockquote>
  
  <p>Prior to build step, I have a dotnet restore step which is completed successfully. Restore step uses a NuGet.config file which includes private feeds in VSTS but the URLs do not look similar to the one in the error. Here's the file just to make it clear.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;packageSources&gt;
      &lt;add key="MyCompany.NuGet.Internal" value="https://MyCompany.pkgs.visualstudio.com/_packaging/MyCompany.NuGet.Internal/nuget/v3/index.json" /&gt;
      &lt;add key="MyCompany.NuGet.ThirdParty" value="https://MyCompany.pkgs.visualstudio.com/_packaging/MyCompany.Nuget.ThirdParty/nuget/v3/index.json" /&gt;
    &lt;/packageSources&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What could be the problem here? Is dotnet build step ignoring the NuGet.config file completely and trying the feeds in the project? I have no idea how that feed URL is generated.</p>