Search code examples
visual-studio-2015entity-framework-core

Nuget error "Object reference not set to an instance of an object" while installing Entityframework 7 from Package Manager Console in VS2015


I am trying to build a sample application using EF7 and mvc 6 in visual studio 2015 pre release.

While installing both EF7 and MVC6 using package manager console getting this error.

 PM> Install-Package EntityFramework.Commands -Version 7.0.0-beta3 -Pre
 Attempting to gather dependencies information for package    
 'EntityFramework.Commands.7.0.0-beta3' with respect to project
 targeting '.NETFramework, Version=v4.5.3' Install-Package : Object
 reference not set to an instance of an object. At line:1 char:1
 + Install-Package EntityFramework.Commands -Version 7.0.0-beta3 -Pre
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
     + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Can any one help me how to resolve this issue, or I am doing right?


Solution

  • I have solved this problem, by disabling the "https://api.nuget.org/v3/" from the package source, in order to do this, Choose Tools > Nuget Package Manager > Package Source

    And other thing I did is added myget package source "https://www.myget.org/F/aspnetvnext/api/v2/"

    Following the steps Choose Tools > Nuget Package Manager > Package Source > Click add on top of the window and add the myget package source.