Sudhir Goswami
Sudhir Goswami

Reputation: 165

Getting error while accessing the Private Nuget feed

I am getting an error while trying to access the private NuGet feed from Azure Package artifacts.

Install-Package Microsoft.Sdk -version 1.0.0-CI-20191028-053209

The content at 'https://mp.visualstudio.com/Tools/_packaging?_a=feed&feed=Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0' is not valid XML.
  For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
  GET https://mp.visualstudio.com/Tools/_packaging?_a=feed&feed=ocpdirectory%40Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0
  NonAuthoritativeInformation https://mp.visualstudio.com/Tools/_packaging?_a=feed&feed=ocpdirectory%40Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0 429ms
Install-Package : Failed to retrieve information about 'Microsoft.Sdk' from remote source 'https://mpneng.visualstudio.com/Tools/_packa
ging?_a=feed&feed=Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0'.
  The content at 'https://mp.visualstudio.com/Tools/_packaging?_a=feed&feed=Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0' is not valid XML.
  For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass 
the settings into XmlReader.Create method.
At line:1 char:1
+ Install-Package Microsoft.Sdk -version 1.0.0-CI-2019102 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Upvotes: 0

Views: 546

Answers (1)

Vito Liu
Vito Liu

Reputation: 8298

The content at 'https://mp.visualstudio.com/Tools/_packaging?_a=feed&feed=Release/FindPackagesById()?id='Microsoft.Sdk'&semVerLevel=2.0.0' is not valid XML.

According to the error log, it seems that you are using wrong URL, we should using the URL provided in the 'Connect to feed' instructions.

Sample URL link

https://pkgs.dev.azure.com/{Org name}/{project name}/_packaging/{artifact name}/nuget/v3/index.json

Upvotes: 1

Related Questions