Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IdentityUserLogin does not contain a definition for User

I was trying to build an asp.net MVC-5 project when i suddenly had this error

Error 1 'Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin' does not contain a definition for 'User' and no extension method 'User' accepting a first argument of type 'Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin' could be found (are you missing a using directive or an assembly reference?) D:\Projects\FULL\Control Panel\ControlPanel.Web\Models\IdentityModels.cs 53 56 ControlPanel.Web

which i do not know the nature of it provided that i have all the necessary packages installed via nugget.

the error I have

ALL I WAS TRYING TO DO IS CONFIGURING SOME RELATIONSHIPS!

some code that doesn't compile in the OnModelCreating override

like image 284
a7madx7 Avatar asked Mar 17 '14 06:03

a7madx7


1 Answers

I figured it out at last >>

I was using Microsot.Aspnet.Identitly assembly version 2 where they got rid of the navigation properties that existed in version 1 some how,, couldn't imaging such inconsistency due to a small nuget update.

like image 57
a7madx7 Avatar answered Nov 06 '22 12:11

a7madx7