title: EntityFramework Core 2.0 - Add Migration error "The EntityFramework package is not installed"
body: <p><em>I'm getting an error when trying to Add-Migration for Entity Framework Core, to a Code First project, here are the details...</em></p>
  <p>I have created a new ASP.Net Core web project (Core 2.0 in VS 2017).  It's using Microsoft.AspNetCore.All dependency, shown below:</p>
  <p><a href="https://i.stack.imgur.com/eRmc3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eRmc3.png" alt="enter image description here" /></a></p>
  <p>I am looking to utilize the Entity Framework Core (my understanding was that the All metadata had the EF Core dependencies included already, shown below, looks to be correct):</p>
  <p><a href="https://i.stack.imgur.com/PfBIM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PfBIM.png" alt="enter image description here" /></a></p>
  <p>I've setup my entities and context and I've ensured the DB is setup using the following code.</p>
  <p><strong>Example Model</strong></p>
  <pre><code>public class City
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      [Required]
      [MaxLength(50)]
      public string Name { get; set; }
  
      [MaxLength(200)]
      public string Description { get; set; }
  }
  </code></pre>
  <p><strong>Example Context</strong></p>
  <pre><code>public class CityInfoContext : DbContext
  {
      public DbSet&lt;City&gt; Cities { get; set; }
      public DbSet&lt;PointOfInterest&gt; PointsOfInterest { get; set; }
  
      public CityInfoContext(DbContextOptions options) : base(options)
      {
          Database.EnsureCreated();
      }
  }
  </code></pre>
  <p><strong>Startup.cs Config</strong></p>
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddMvc()
      .AddMvcOptions(options =&gt; {
          options.OutputFormatters.Add(new XmlDataContractSerializerOutputFormatter());
      })
      .AddJsonOptions(options =&gt; {
          if (options.SerializerSettings.ContractResolver != null)
          {
              var res = options.SerializerSettings.ContractResolver as DefaultContractResolver;
              res.NamingStrategy = null;
          }
      });
  
      services.AddSingleton&lt;IHttpContextAccessor, HttpContextAccessor&gt;();
      services.AddSingleton&lt;IMailService, LocalMailService&gt;();
  
      // Entity Framework services.
      var connectionString = @&quot;Server=(localdb)\mssqllocaldb;Database=CityInfoDB;Trusted_Connection=True;&quot;;
      services.AddDbContext&lt;CityInfoContext&gt;(options =&gt; options.UseSqlServer(connectionString));
  }
  </code></pre>
  <p>Initializing the dB context with this line in my controller:</p>
  <pre><code>public class DummyController: Controller
  {
      CityInfoContext _ctx;
  
      public DummyController(CityInfoContext ctx)
      {
          _ctx = ctx;
      }
  }
  </code></pre>
  <p>I can see the db is created successfully - all good so far.</p>
  <p><a href="https://i.stack.imgur.com/c42GA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c42GA.png" alt="enter image description here" /></a></p>
  <p>I want to take a snapshot of my db using this command:
  <em>PM&gt; Add-Migration CityInfoInitialMigration</em></p>
  <p>But get the error:
  <em>The EntityFramework package is not installed on project 'CityInfo.API'.</em></p>
  <p><a href="https://i.stack.imgur.com/9gk7Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9gk7Y.png" alt="enter image description here" /></a></p>
  <p>Has anyone come across this before?  I explicitly tried adding the EF packages but that didn't work either!</p>