简体   繁体   中英

2015 visual studio Nuget package manager does not let me save new package sources and Nuget.Config is not valid XML

2015 visual studio Nuget package manager does not let me save new package sources. I did the following:

  1. In Visual Studio, navigate to Tools-->Options-->NuGet Package Manager
  2. Package Sources and then, press + to add the packages. Everything worked appropriately but, the sources are not saved
  3. When, i restart, I see the following on the start of visual studio

    Nuget operation failed

    Nuget.Config is not valid XML. Path: 'C:\\Users\\mnperezp\\AppData\\Roaming\\Nuget\\Nuget.Config'. '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.

I tried the following:

  1. Look for the location of this config file. I do not have anything called like that. The closer that i see is the following: C:\\Users\\mnperezp.nuget\\packages
  2. Uninstall and install the Nuget package manager--> I observed the same
  3. Update the Powershell ISE 5.0--> I observed the same.

Could you give me some tips on how to proceed? Much appreciated.

Delete NuGet.Config from:

C:\Users\your-username\AppData\Roaming\NuGet

Upon re-opening VS2015 a new config file will be created and the issue should be resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM