Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New version of NuGet not working on VS2010

I've downloaded ASP.NET MVC 3 RC and the new NuGet CTP version.

When I try to install anything in the thru the Package Manager Console I get the an error message. Here are two samples:

PM> nip elmah
Install-Package : Object reference not set to an instance of an object.
At line:1 char:4
+ nip <<<<  elmah
    + CategoryInfo          : NotSpecified: (:) [Install-Package], NullReferenceException
    + FullyQualifiedErrorId : NuGet.VisualStudio.Cmdlets.InstallPackageCmdlet


PM> nip SQLCE.EntityFramework
Install-Package : Object reference not set to an instance of an object.
At line:1 char:4
+ nip <<<<  SQLCE.EntityFramework
    + CategoryInfo          : NotSpecified: (:) [Install-Package], NullReferenceException
    + FullyQualifiedErrorId : NuGet.VisualStudio.Cmdlets.InstallPackageCmdlet

When I use the Add Library Package Reference in the Solution Explorer no message is displayed but the package is not installed.

I tried to revert to NuPack and it works fine but the Package list is not updated (for instance SQLCE.EntityFramework 4.0.8435.1 is not been displayed only 4.0.8402.1).

Any help?

like image 432
Andre Vianna Avatar asked Nov 10 '10 12:11

Andre Vianna


2 Answers

I had the same problem. Deleting my packages folder fixed it.

like image 72
HansoS Avatar answered Sep 18 '22 18:09

HansoS


I experienced exactly the same problem.

In the end I had to remove everything from the packages directory and go through each project and run an "update-package" for each package I had previously installed.

like image 33
Ben Foster Avatar answered Sep 19 '22 18:09

Ben Foster