NuGet Package Doesn't Work in Visual Studio 2015

After updating Visual Studio 2015, I get the following error when starting visual studio. Failed to perform Nuget operation. NuGet.Config is not valid XML. Way

'' hexadecimal value 0x00, is an invalid character. Line 1, position 1.

Also, I can no longer use the package manager console.

I tried uninstalling and reinstalling it, but without success. I am still getting the error above.

Any recommendations on how to fix this would be appreciated, thanks!

+8
visual-studio entity-framework-6 nuget-package
source share
4 answers

Remove NuGet.Config from:

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

After reopening VS2015, a new configuration file will be created and the problem should be resolved.

+26
source share

Do you have a nuget.config file in your solution?

The format has changed from fx:

 <settings> <repositoryPath>..\..\packages</repositoryPath> </settings> 

To:

 <configuration> <config> <add key="repositoryPath" value="..\..\packages" /> </config> </configuration> 
+2
source share

Delete the ".nuget" folder from C \ users \ username

C:. \ Users \ {username} \ NuGet

and you can upgrade or reinstall the package.

This is a job for me.

+2
source share

Maybe some of your packages were cached?

Download the latest version of nuget.exe (from the website https://dist.nuget.org/win-x86-commandline/latest/nuget.exe ) and open a command prompt (preferably with administrator rights) and specify the location where you are download nuget.exe and run the following commands (from the command line or powershell console).

 nuget.exe locals -clear global-packages nuget.exe locals -clear http-cache nuget.exe locals -clear temp 

Then restart Visual Studio.

+1
source share

All Articles