title: Azure Pipelines YAML - dotnet nuget push fails with unexpected token error
body: <p>Setting up my first YAML pipeline I have an odd error when pushing my package to our internal Az DevOps feed.</p>
  
  <p>Here's the relevant lump of YAML.</p>
  
  <pre><code>- task: DotNetCoreCLI@2
    displayName: 'Push this package to the feed'
    inputs:
      command: 'push'
      nuGetFeedType: 'internal'
      packagesToPush: '$(build.artifactStagingDirectory)/*.nupkg'
      publishVstsFeed: 'https://mycompany.pkgs.visualstudio.com/_packaging/Packages/nuget/v3/index.json'
  
  </code></pre>
  
  <p>Results in this.</p>
  
  <blockquote>
    <p>error: NuGet.Config is not valid XML. Path: 'd:\a\1\NuGet_74\NuGet.Config'.
    error:   '/' is an unexpected token. The expected token is '>'. Line 1, position 365.</p>
  </blockquote>
  
  <p>From larger output:</p>
  
  <pre><code>##[section]Starting: DotNetCoreCLI
  ==============================================================================
  Task         : .NET Core
  Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
  Version      : 2.149.0
  Author       : Microsoft Corporation
  Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
  ==============================================================================
  [command]C:\windows\system32\chcp.com 65001
  Active code page: 65001
  SYSTEMVSSCONNECTION exists true
  SYSTEMVSSCONNECTION exists true
  SYSTEMVSSCONNECTION exists true
  ##[warning]Can\'t find loc string for key: Warning_SessionCreationFailed
  ##[warning]Warning_SessionCreationFailed {"statusCode":500,"result":{"$id":"1","innerException":null,"message":"A potentially dangerous Request.Path value was detected from the client (:).","typeName":"Microsoft.VisualStudio.Services.Common.VssServiceException, Microsoft.VisualStudio.Services.Common","typeKey":"VssServiceException","errorCode":0,"eventId":3000}}
  Saving NuGet.config to a temporary config file.
  Saving NuGet.config to a temporary config file.
  [command]C:\hostedtoolcache\windows\dncs\2.2.104\x64\dotnet.exe nuget push d:\a\1\a\Demo.HypermediaClient.1.0.0.nupkg --source https://mycompany.pkgs.visualstudio.com/_packaging/https%3A%2F%2Fmycompany.pkgs.visualstudio.com%2F_packaging%2FPackages%2Fnuget%2Fv3%2Findex.json/nuget/v3/index.json --api-key VSTS
  error: NuGet.Config is not valid XML. Path: 'd:\a\1\NuGet_74\NuGet.Config'.
  error:   '/' is an unexpected token. The expected token is '&gt;'. Line 1, position 365.
  ##[error]Error: C:\hostedtoolcache\windows\dncs\2.2.104\x64\dotnet.exe failed with return code: 1
  ##[error]Packages failed to publish
  ##[section]Finishing: DotNetCoreCLI
  
  </code></pre>
  
  <p>The NuGet.Config file is normal and otherwise works with other commands and VS.</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;packageSources&gt;
          &lt;clear /&gt;
          &lt;add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /&gt;
      &lt;/packageSources&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The warning is suspicious... I will continue looking and post back my findings.</p>