title: Can't inherit from IdentityUser and IdentityRole in ASP.NET Core 2.0
body: <p>I'm trying to finish updating to .NET Core 2.0 but a couple of errors pop up:</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>I have two classes, ApplicationRole and ApplicationUser which inherit some properties from IdentityRole and IdentityUser.</p>
  
  <p>With the update to Core 2.0 I'm getting the following errors, claiming that IdentityRole and IdentityUser could not be found.</p>
  
  <p>However, the package <code>Microsoft.AspNetCore.Identity.EntityFrameworkCore 2.0</code> is installed in the new version of .NET Core</p>
  
  <p><strong>About IdentityRole:</strong></p>
  
  <p><em>Message 1:</em></p>
  
  <blockquote>
    <p>The type or namespace name 'IdentityRole' could not be found (is it missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p><em>Message 2:</em></p>
  
  <blockquote>
    <p>The 'Application.Models.ApplicationRole' type can not be used as a parameter of type 'TRole' in the generic type or method 'IdentityDbContext '. There is no implicit reference conversion from 'Application.Models.ApplicationRole' to 'Microsoft.AspNetCore.Identity.IdentityRole '.</p>
  </blockquote>
  
  <p><em>Definition of ApplicationRole:</em></p>
  
  <pre><code>public class ApplicationRole:IdentityRole
  {
      public string Description { get; set; }
      public DateTime CreatedDated { get; set; }
      public string IPAddress { get; set; }
  }
  </code></pre>
  
  <p><strong>About IdentityUser:</strong></p>
  
  <p><em>Message 1:</em></p>
  
  <blockquote>
    <p>The type or namespace name 'IdentityUser' could not be found (is it missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p><em>Message 2:</em></p>
  
  <blockquote>
    <p>The 'Application.Models.ApplicationUser' type can not be used as a parameter of type 'TUser' in the generic type or method 'IdentityDbContext '. There is no implicit reference conversion from 'Application.Models.ApplicationUser' to 'Microsoft.AspNetCore.Identity.IdentityUser '.</p>
  </blockquote>
  
  <p><em>Definition of ApplicationUser</em></p>
  
  <pre><code>public class ApplicationUser:IdentityUser
  {
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>The guide followed to define this classes and their use are here:</p>
  
  <p><a href="http://www.c-sharpcorner.com/article/asp-net-core-mvc-authentication-and-role-based-authorization-with-asp-net-core/" rel="noreferrer">http://www.c-sharpcorner.com/article/asp-net-core-mvc-authentication-and-role-based-authorization-with-asp-net-core/</a></p>
  
  <p>With the change to Core 2.0 I wonder how IdentityRole and IdentityUser changed so I can no longer inherit from them.</p>