title: How to create migration when DBContext in different assembly
body: <p>I have <code>NET Core 3.1</code> application where my <code>[models,dbcontext,application]</code> are all in their own assemblies.I am trying to issue a migration(s) for the  application.I keep getting this error:</p>
  
  <pre><code>$ dotnet ef migrations add InitialCreate --project DataAccess 
  </code></pre>
  
  <blockquote>
    <p>MSBUILD : error MSB1009: Project file does not exist. Switch:
    DataAccess Unable to retrieve project metadata. Ensure it's an
    MSBuild-based .NET Core project. If you're using custom
    BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use
    the --msbuildprojectextensionspath option.</p>
  </blockquote>
  
  <p><strong>Current Structure</strong></p>
  
  <pre><code>*root
    -App  (.NET Core 3.1)
    -DataAccess  (.NET Standard 2.1)   (Contains the DBContext)
    -Models     (.NET Standard 2.1)   (contains models)
  </code></pre>
  
  <p>I have also tried creating a separate assembly for migrations and use the MigrationAssembly extension in my <code>App</code> :</p>
  
  <pre><code>services.AddDbContext&lt;[some DBContext]&gt;(x =&gt; x.UseSqlServer([some string],x=&gt;x.MigrationsAssembly("Migrations")));
  </code></pre>
  
  <p><strong>Tried Structure</strong></p>
  
  <pre><code> *root
        -App
        -Migrations (.NET Standard 2.1)
        -DataAccess (.NET Standard 2.1)
        -Models (.NET Standard 2.1)
  </code></pre>
  
  <p>I do not understand how this should be done.I want to be able to do migrations and ideally i would like to keep them in their own assembly.Currently i can't do them at all.</p>
  
  <p><strong>P.S</strong><br> I have also tried adding this to my <code>App</code> csproj file:</p>
  
  <pre><code>&lt;GenerateRuntimeConfigurationFiles&gt;True&lt;/GenerateRuntimeConfigurationFiles&gt;
  </code></pre>