title: Cannot create controller with Entity framework - Unable to retrieve metadata
body: <p><em>I'm using VS2013</em></p>
  
  <p>When I try to create an <strong>"MVC 5 Controller with views using entity Framework"</strong> I get the following error:</p>
  
  <pre><code>there was an error running the selected code generator ''Unable to retrieve metadata for WebApplication.Domain.Entities.Product'.'
  </code></pre>
  
  <p><strong>EFDbContext.cs</strong></p>
  
  <pre><code>using System.Data.Entity;
  using WebApplication.Domain.Entities;
  
  namespace WebApplication.Domain.Concrete
  {
      public class EFDbContext : DbContext
      {
          public DbSet&lt;Product&gt; Products;
      }
  }
  </code></pre>
  
  <p><strong>Product.cs</strong></p>
  
  <pre><code>using System.ComponentModel.DataAnnotations;
  
  namespace WebApplication.Domain.Entities
  {
      public class Product
      {
          [Key]
          public int ProductID { get; set; }
  
          [Required]
          public string Title { get; set; }
      }
  }
  </code></pre>
  
  <p><strong>Web.config</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=301880
    --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;connectionStrings&gt;
      &lt;add name="EFDbContext" connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=WebApplication;Integrated Security=True" providerName="System.Data.SqlClient"/&gt;
    &lt;/connectionStrings&gt;
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I have a Table set up called Products and it has a definition like so:</p>
  
  <pre><code>CREATE TABLE [dbo].[Products] (
      [ProductID] INT            IDENTITY (1, 1) NOT NULL,
      [Title]     NVARCHAR (255) NULL,
      PRIMARY KEY CLUSTERED ([ProductID] ASC)
  );
  </code></pre>
  
  <p>Any ideas what is going wrong? I have tried everything that has returned on Google.</p>
  
  <p><strong>Packages I have installed:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="EntityFramework" version="6.0.1" targetFramework="net45" /&gt;
    &lt;package id="jQuery" version="1.10.2" targetFramework="net45" /&gt;
    &lt;package id="jQuery.Validation" version="1.11.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /&gt;
    &lt;package id="Unity" version="3.0.1304.1" targetFramework="net45" /&gt;
    &lt;package id="Unity.Mvc" version="3.0.1304.0" targetFramework="net45" /&gt;
    &lt;package id="WebActivatorEx" version="2.0.4" targetFramework="net45" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>My project can be found here: <a href="https://github.com/jimmyt1988/WebApplication2" rel="noreferrer">https://github.com/jimmyt1988/WebApplication2</a></p>