Nuget Issue - 404 for all packages

落花浮王杯 提交于 2021-02-10 15:40:22

问题


I have been having some troubles with the nuget package manager. Firstly, I was suddenly unable to search nuget. If I tried to install something through the packet manager console, I would get the following error

PM> Install-Package Microsoft.Bcl.Async
Install-Package : The ServicePointManager does not support proxies with the https scheme.
At line:1 char:16
+ Install-Package <<<<  Microsoft.Bcl.Async
    + CategoryInfo          : NotSpecified: (:) [Install-Package], NotSupportedException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

To solve this, I had to add a package source. Both of these seemed to work

http://www.nuget.org/api/v2/
http://packages.nuget.org/v1/FeedService.svc

This worked at the time. I searched and downloaded a package succesfully. The next morning however, I am now getting a different error. If I try and download anything from the nuget UI, I get a 404 message after I select the package that I want. If I try and download something from the package manager console, I get the following error

The source at All [(Aggregate source)] is unreachable. Falling back to NuGet Local Cache at C:\Users\MYUSERNAMEHERE\AppData\Local\NuGet\Cache
Install-Package : Unable to find package 'Microsoft.Bcl.Async'.
At line:1 char:16
+ Install-Package <<<<  Microsoft.Bcl.Async
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I asked a friend to try and download the package that I wanted, and he was able to without issue. Which leads me to believe this is a problem on my end. Any ideas?


回答1:


I was using fiddler to inspect soap messages from a WCF service that I wrote, and I followed this tutorial to set it up

http://blogs.telerik.com/fiddler/posts/13-01-08/capturing-traffic-from-.net-services-with-fiddler

In this tutorial, it instructs you to add the following in to the machine.config file

<!-- The following section is to force use of Fiddler for all applications, including those running in service accounts -->
<system.net>
    <defaultProxy
                enabled = "true"
                useDefaultCredentials = "true">
        <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
    </defaultProxy>
</system.net>

When I removed this property, my Nuget issues went away



来源:https://stackoverflow.com/questions/25804849/nuget-issue-404-for-all-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!