简体   繁体   中英

VS2015 - NuGet Install-Package : Invalid length for a Base-64 char array or string

Something has gone catastrophically wrong with NuGet in my install of VS2015. Whenever I attempt to run Install-Package, I get the following error:

Install-Package : Invalid length for a Base-64 char array or string.
At line:1 char:1
+ Install-Package log4net
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.Install 
   PackageCommand

I can't for the life of me find any other information about this issue. I have restarted VS, restarted my PC, tried re-installing NuGet, but I feel like this is an underlying issue with powershell.

Any suggestions would be greatly appreciated.

EDIT - SOLVED

So, after a frustrating evening, I have finally solved the issue. I had to uninstall VS2015, re-install it, clear my vssettings file then delete the NuGet.config file.

Cannot guarantee that this will work but according to https://github.com/NuGet/Home/issues/2239#issuecomment-193208925 the only thing you need to do is delete the nuget.config file. Sorry if it doesn't work for you.

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