Andre Vianna
Andre Vianna

Reputation: 1732

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?

Upvotes: 11

Views: 4579

Answers (4)

HansoS
HansoS

Reputation: 172

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

Upvotes: 8

Martin Capodici
Martin Capodici

Reputation: 1514

I also had this problem.

I solved it by ensuring that I did packed with the nuspec and dll in the same folder and the nuspec name was mydll.dll.nuspec. When I deviated from this I got said error.

Upvotes: 0

davidfowl
davidfowl

Reputation: 38764

Are you pointing to the old feed by any chance? Or an old local feed?

Upvotes: 0

Ben Foster
Ben Foster

Reputation: 34800

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.

Upvotes: 6

Related Questions