mantics
mantics

Reputation: 57

How do I resolve error Installing Twilio NUGET

Good day Guys,

I have used Twilio on a project before and working fine. But i am trying to use it on another project on the same development machine. It keeps throwing the error below.

Any one with help

Install-Package Twilio
Attempting to gather dependencies information for package 'Twilio.5.37.4' with respect to project 'Newzone_CreditFacility', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Twilio.5.37.4' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Twilio.5.37.4'
Resolved actions to install package 'Twilio.5.37.4'
Adding package 'Microsoft.IdentityModel.Logging.1.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Microsoft.IdentityModel.Logging.1.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Microsoft.IdentityModel.Logging.1.1.2' to 'packages.config'
Successfully installed 'Microsoft.IdentityModel.Logging 1.1.2' to Newzone_CreditFacility
Adding package 'Newtonsoft.Json.10.0.1' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Newtonsoft.Json.10.0.1' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Newtonsoft.Json.10.0.1' to 'packages.config'
Executing script file 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages\Newtonsoft.Json.10.0.1\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 10.0.1' to Newzone_CreditFacility
Adding package 'Microsoft.IdentityModel.Tokens.5.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Microsoft.IdentityModel.Tokens.5.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'Microsoft.IdentityModel.Tokens.5.1.2' to 'packages.config'
Successfully installed 'Microsoft.IdentityModel.Tokens 5.1.2' to Newzone_CreditFacility
Adding package 'System.IdentityModel.Tokens.Jwt.5.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'System.IdentityModel.Tokens.Jwt.5.1.2' to folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Added package 'System.IdentityModel.Tokens.Jwt.5.1.2' to 'packages.config'
Successfully installed 'System.IdentityModel.Tokens.Jwt 5.1.2' to Newzone_CreditFacility
Install failed. Rolling back...
Package 'Twilio 5.37.4' does not exist in project 'Newzone_CreditFacility'
Removed package 'System.IdentityModel.Tokens.Jwt 5.1.2' from 'packages.config'
Removed package 'Microsoft.IdentityModel.Tokens 5.1.2' from 'packages.config'
Removed package 'Newtonsoft.Json 10.0.1' from 'packages.config'
Removed package 'Microsoft.IdentityModel.Logging 1.1.2' from 'packages.config'
Package 'Twilio 5.37.4' does not exist in folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removing package 'System.IdentityModel.Tokens.Jwt 5.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removed package 'System.IdentityModel.Tokens.Jwt 5.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removing package 'Microsoft.IdentityModel.Tokens 5.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removed package 'Microsoft.IdentityModel.Tokens 5.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removing package 'Newtonsoft.Json 10.0.1' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removed package 'Newtonsoft.Json 10.0.1' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removing package 'Microsoft.IdentityModel.Logging 1.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Removed package 'Microsoft.IdentityModel.Logging 1.1.2' from folder 'c:\users\owner\documents\visual studio 2015\Projects\Newzone_CreditFacility\packages'
Install-Package : Object reference not set to an instance of an object.
At line:1 char:1
+ Install-Package Twilio
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : 
 NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Upvotes: 1

Views: 562

Answers (1)

Clint
Clint

Reputation: 6499

Here are some of steps you can try to fix this issue: You check for resolution after each of the step

  • Restart Visual Studio
  • Rename the folder Nuget to Nuget.old present in %appdata% > Roaming
  • Launch VS as admin
  • Check for updates under Tools > Extensions and Updates
  • Rename the folder cache to cache.old under AppData\Local\NuGet\

If nothing works you can try to re-install package manager see reference

Upvotes: 1

Related Questions