title: .Net core, error when scaffolding with entity framework
body: <p>I'm trying to create a controller leveraging the scaffolding with Entity Framework option, but it simply is not working, giving the error bellow:
  <a href="https://i.stack.imgur.com/2uWfl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2uWfl.png" alt="enter image description here"></a></p>
  
  <p>The .csproj is here:</p>
  
  <pre><code> &lt;ItemGroup&gt;
      &lt;PackageReference Include="AutoMapper" Version="6.1.1" /&gt;
      &lt;PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="2.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.2" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.1" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGenerators.Mvc" Version="1.1.1" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.1" /&gt;
      &lt;DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>And my DbContext has the DbSet to the Model I'm trying to use in the scaffolding:</p>
  
  <pre><code>public DbSet&lt;Tarefa&gt; Tarefas { get; set; }
  </code></pre>
  
  <p>I've tried not only with the Model, but also with the ViewModel, but the result is the same.
  Could anyone give a tip of what I'm missing?</p>