Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuget isn't working for me on VS. #3281

Closed
Wua4 opened this issue Aug 5, 2016 · 9 comments
Closed

Nuget isn't working for me on VS. #3281

Wua4 opened this issue Aug 5, 2016 · 9 comments
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue

Comments

@Wua4
Copy link

Wua4 commented Aug 5, 2016

When opening the package manager in VS2015;

[nuget.org] Unable to load the service index for source https://www.nuget.org/api/v2/.
An error occurred while sending the request.
The remote server returned an error: (400) Bad Request.

I can't install packages like this.

@emgarten
Copy link
Member

emgarten commented Aug 5, 2016

try adding the v3 source: https://api.nuget.org/v3/index.json

@rrelyea rrelyea added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Aug 8, 2016
@rrelyea
Copy link
Contributor

rrelyea commented Aug 8, 2016

Like duplicate of #2880 .
please confirm or deny.

@rrelyea rrelyea closed this as completed Aug 8, 2016
@Wua4
Copy link
Author

Wua4 commented Aug 9, 2016

I don't believe it's a duplicate. The error is different. Also there is no http_proxy variable on my machine.

@Wua4
Copy link
Author

Wua4 commented Aug 9, 2016

V3 source is the same

[nuget V3] Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The remote server returned an error: (400) Bad Request.

@Wua4
Copy link
Author

Wua4 commented Aug 9, 2016

Figure it out on my own. Deleted the %AppData%\NuGet\nuget.config and restarted VS2015

@emgarten
Copy link
Member

emgarten commented Aug 9, 2016

@Alexzxz very strange, your nuget.config may have contained proxy settings that were causing your requests to fail.

@dlidstrom
Copy link

I did the same as @Wua4 and got a new NuGet.Config. It had these lines removed:

<packageRestore>
  <add key="enabled" value="True" />
  <add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
  <add key="skip" value="False" />
</bindingRedirects>
<packageManagement>
  <add key="format" value="1" />
  <add key="disabled" value="False" />
</packageManagement>

Now it works fine!

@Andre6321
Copy link

Had the same - just as an FYI for anyone else fixing this in future, since I have a lot of different projects with a lot of different nuget.config files - this comes up when you have 2 different Nuget.configs for the same project - (Can often happen if you have maybe an outdated save version via a one Drive save for example - then you wont be able to download ANY nugget packages for ANY projects (even if the duplicate is within a seperate project) so best way to resolve it is checking for any duplicate Nuget.Config and yeah deleting them)

@amirnazary-4screen
Copy link

Can some one paste the full content of the NuGet.Config file here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

6 participants