title: Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.DesignTimeProviderServicesAttribute'
body: <p>I use Visual Studio for Mac, created a .net core web api project.
  The csproj file is like this:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.0&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /&gt;
      &lt;PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.9-dmr" /&gt;
      &lt;PackageReference Include="MySql.Data.EntityFrameworkCore.Design" Version="8.0.9-dmr" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>When I execute "dotnet ef dbcontext scaffold" to scaffold from MySQL with the following command:</p>
  
  <pre><code>dotnet ef dbcontext scaffold "server=[server];port=3306;user=[user];password=[password];database=[dbname]" MySql.Data.EntityFrameworkCore -o Models -c [contextname] -f -v
  </code></pre>
  
  <p>The command returned error like this:</p>
  
  <pre><code>Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.DesignTimeProviderServicesAttribute' from assembly 'Microsoft.EntityFrameworkCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
  </code></pre>
  
  <p>I checked the package Microsoft.EntityFrameworkCore. It is true that no Infrastructure namespace in that package. But Searched online, I find others can successfully scaffold with such settings.
  Is there anything I did wrong?
  How can I scaffold correctly?</p>
  
  <p>Thank you all.</p>