Search code examples
asp.net-coreasp.net-identityasp.net-core-identity

Error on Restoring AspNet Identity Core Package


Using MS VS 2015 Pro and Asp.net Core, I am trying to add Microsoft.AspNet.Identity.Core Package but I am getting this error:

   Errors in c:\users\xxx\documents\visual studio 2015\Projects\WebApplication1\src\WebApplication1\WebApplication1.xproj
        Package Microsoft.AspNet.Identity.Core 2.2.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNet.Identity.Core 2.2.0 supports: net45 (.NETFramework,Version=v4.5)
        One or more packages are incompatible with .NETCoreApp,Version=v1.0.

I also changed the Package version to 2.1. but got same error. Why is this happening?


Solution

  • Microsoft.AspNet.Identity.Core is an old package for ASP.NET 4 (MVC5 for example) not for ASP.NET Core.

    You need Microsoft.AspNetCore.Identity package for ASP.NET Core.