title: EF Core Migrations in Separate Project - Issues
body: <p>I am not successful in adding ef core migrations in a separate project. I have provided the project structure at the end. </p>
  
  <p>The DbContext class and the migrations are in separate projects such that the former is a class library and the migrations project is a console application. I added a reference to the DbContext project in the migrations project however, I am getting errors while running migration commands </p>
  
  <p>\EF.BlogsDb.Migrations > dotnet ef migrations add InitialCreate --project EF.BlogsDb.Migrations.csproj</p>
  
  <p>No DbContext was found in assembly 'EF.BlogsDb.Migrations'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic. </p>
  
  <p>I followed advise from this <a href="https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/projects" rel="noreferrer">link</a> but I am not sure of the following. </p>
  
  <p>In which project should i add these lines? is it the migrations project or my web project or the DbContext project? </p>
  
  <pre><code>options.UseSqlServer(
      connectionString,
      x =&gt; x.MigrationsAssembly("MyApp.Migrations")); 
  </code></pre>
  
  <p>Why should i Add a reference to the migrations assembly from the startup assembly? </p>
  
  <p>From which location/folder/project should i run this command? </p>
  
  <pre><code>dotnet ef migrations add NewMigration --project MyApp.Migrations 
  </code></pre>
  
  <p>I can share the source code if you can tell me how to do that.</p>
  
  <p>Thanks in advance for the clarifications one might provide!</p>
  
  <p>Here is my project structure looks like: </p>
  
  <p><a href="https://i.stack.imgur.com/nyhgt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nyhgt.png" alt="Project Structure"></a></p>