Xaphas
Xaphas

Reputation: 519

VS17 - NuGet Config invalid

I get this error that my NuGet config was supposed valid and it tells me to run a NuGet Restore, which I did many times, but it still doesn't manage to run the website. The problem is, that I cannot get into the NuGet Manager either, because VS just tells me that my config was invalid before closing the dialogue all together.

enter image description here

References: enter image description here

Output: enter image description here

Anyone of you ever experienced this? How can I get at least back to editing my packages?

Upvotes: 1

Views: 2534

Answers (3)

Frank Fu
Frank Fu

Reputation: 3643

Remove-Item $env:APPDATA\Nuget\Nuget.config

Is the one-liner powershell version of @Sigar Dave.

Upvotes: 0

Leo Liu
Leo Liu

Reputation: 76996

VS17 - NuGet Config invalid

(According to the error messages, we could not give the most direct correct answer for this issue, we can only give you some troubleshootings. In order to avoid losing contact in the round-trip comments, I post those troubleshootings as answer instead of comments.)

  • update Visual Studio to the latest version.
  • Check if there is any nuget.config in your solution, if yes, please open it and check for XML syntax errors or you can delete it.
  • Create a new blank project check if this issue still persist, if yes, try to re-install the nuget package manager.

Hope this helps.

Upvotes: 2

Sigar Dave
Sigar Dave

Reputation: 2654

Did you try to

  1. Delete the nuget.config file at %AppData%/Nuget
  2. Close the Solution and Re-Open

https://stackoverflow.com/a/38340901/1249386

Upvotes: 2

Related Questions