PM> Install-Package AutoFixture -Verbose
GET https://api.nuget.org/v3/registration1-gz/autofixture/index.json
OK https://api.nuget.org/v3/registration1-gz/autofixture/index.json 175ms
GET https://api.nuget.org/v3/registration1-gz/autofixture/page/2.0.0/3.6.2.json
GET https://api.nuget.org/v3/registration1-gz/autofixture/page/3.6.3/3.24.6.json
GET https://api.nuget.org/v3/registration1-gz/autofixture/page/3.25.0/3.47.0.json
GET https://api.nuget.org/v3/registration1-gz/autofixture/page/3.47.1/3.48.0.json
OK https://api.nuget.org/v3/registration1-gz/autofixture/page/2.0.0/3.6.2.json 133ms
OK https://api.nuget.org/v3/registration1-gz/autofixture/page/3.6.3/3.24.6.json 172ms
OK https://api.nuget.org/v3/registration1-gz/autofixture/page/3.25.0/3.47.0.json 260ms
OK https://api.nuget.org/v3/registration1-gz/autofixture/page/3.47.1/3.48.0.json 305ms
Attempting to gather dependency information for package 'AutoFixture.3.48.0' with respect to project 'Tests\SquareConnect.Tests', targeting '.NETFramework,Version=v4.5.2'
Package AutoFixture from source nuget.org gathered from cache.
Total number of results gathered : 9
Gathering dependency information took 13.34 ms
Summary of time taken to gather dependencies per source :
Attempting to resolve dependencies for package 'AutoFixture.3.48.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'AutoFixture.3.48.0'
Resolved actions to install package 'AutoFixture.3.48.0'
Retrieving package 'AutoFixture 3.48.0' from 'nuget.org'.
Install failed. Rolling back...
Package 'AutoFixture.3.48.0' does not exist in project 'SquareConnect.Tests'
Package 'AutoFixture.3.48.0' does not exist in folder 'D:\Documents\GitHub\SqaureConnect.NET\packages'
Executing nuget actions took 14.57 ms
Install-Package : '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
At line:1 char:1
+ Install-Package AutoFixture -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:00:00.5469322
I am not sure as to what may be the issue, most other packages install correctly however this package fails.
Update
In a moment I am going to see if I can pull the stack trace!
I have updated the output with the verbose option turned on
What version was this from?
Can you please report the behavior in our latest publicly available work (3.5.0-beta2 nuget.exe) ?
see http://nuget.org/downloads
This covers Visual Studio 2015 Update 3, using Nuget 3.4.4 and carries over to Nuget 3.5.0
With VS 2015 Update 3 + NuGet 3.5.0-beta2.
File new project>command line app (net fx 4.5.2)
Package Manager console: Install-Package AutoFixture -Verbose
Works for me.
What is different about your project?
Also, 2 related issues (that have the same error message mentioned) raised the following possibility:
"Looks like one of your app.config or web.config files is corrupt."
can you check yours?
I found one of those issues and attacked the config first. The weird thing is that other packages do install, only AutoFixture seems to be the issue (and all packages from the developer)
Hey guys.... something made me think about caching.
I ran the following commands:
nuget.exe locals -clear global-packages
nuget.exe locals -clear packages-cache
nuget.exe locals -clear http-cache
and tried again, the install was successful!
It was that or because of a new package release lol
@Seeker1437 I am naive to NugetPackages. Can you please tell me where did you run the commands? A command prompt does not recognise nuget.exe.
Downlaod this:
https://dist.nuget.org/win-x86-commandline/latest/nuget.exe (or check here: https://dist.nuget.org/index.html)
You can run this from anywhere using command prompt or powershell.
Then you can run the following commands::
nuget.exe locals -clear global-packages
nuget.exe locals -clear packages-cache
nuget.exe locals -clear http-cache
The comment above solved my problem. I downloaded the latest nuget.exe and ran it as admin ,
then execute
nuget.exe locals -clear all
Seems i had issues on my local as the problem persists on different projects I'm working on when installing or updating any package
If you can't find nuget.exe
location, use this dotnet
command:
dotnet nuget locals clear all
use powershell command
dotnet nuget locals all --clear
use powershell command
dotnet nuget locals all --clear
Ran this in powershell and worked like Charm :)
Hey guys.... something made me think about caching.
I ran the following commands:
nuget.exe locals -clear global-packages nuget.exe locals -clear packages-cache nuget.exe locals -clear http-cache
and tried again, the install was successful!
This seems to have worked!
Hey guys.... something made me think about caching.
I ran the following commands:
nuget.exe locals -clear global-packages nuget.exe locals -clear packages-cache nuget.exe locals -clear http-cache
and tried again, the install was successful!
Tanks
dotnet nuget locals --clear all
worked for me
These did not work for me:
dotnet nuget locals all --clear
dotnet nuget locals clear all
Hey guys.... something made me think about caching.
I ran the following commands:
nuget.exe locals -clear global-packages nuget.exe locals -clear packages-cache nuget.exe locals -clear http-cache
and tried again, the install was successful!
This worked for me - the middle line didn't run, however the others fixed my issue.
I have moved my hard drives over to a new PC because of PC problems and this seemed to cause some issues when I was rebuilding our project while restoring the NuGet packages and I was getting the same error as the title suggests.
Most helpful comment
Hey guys.... something made me think about caching.
I ran the following commands:
and tried again, the install was successful!