Base solution for your next web application
Open Closed

Generating table Users causes an error #8446


User avatar
0
logicpulse created

Hi,

When i create table Users with ASP NET Zero Power tools, it says "Build failed" and I dont know why. Can anyone please help me?

Thanks in advance.


4 Answer(s)
  • User Avatar
    0
    yekalkan created

    After code generation, try to build your solution. If it fails to build, copy the error and share it here.

  • User Avatar
    0
    logicpulse created

    It gives me 3 errors:

    Severity Code Description Project File Line Suppression State Error CS1061 'Users' does not contain a definition for 'UserName' and no accessible extension method 'UserName' accepting a first argument of type 'Users' could be found (are you missing a using directive or an assembly reference?) access.track.EntityFrameworkCore D:\track\aspnet-core\src\access.track.EntityFrameworkCore\Migrations\Seed\Host\HostRoleAndUserCreator.cs 44 Active

    Severity Code Description Project File Line Suppression State Error CS1503 Argument 1: cannot convert from 'access.track.Authorization.Users.User' to 'access.track.Logicpulse.Users' access.track.EntityFrameworkCore D:\track\aspnet-core\src\access.track.EntityFrameworkCore\Migrations\Seed\Host\HostRoleAndUserCreator.cs 62 Active

    Severity Code Description Project File Line Suppression State Error CS1061 'Users' does not contain a definition for 'UserName' and no accessible extension method 'UserName' accepting a first argument of type 'Users' could be found (are you missing a using directive or an assembly reference?) access.track.EntityFrameworkCore D:\track\aspnet-core\src\access.track.EntityFrameworkCore\Migrations\Seed\Tenants\TenantRoleAndUserBuilder.cs 57 Active

  • User Avatar
    0
    logicpulse created

    I also have a warning saying:

    Severity Code Description Project File Line Suppression State Warning CS0114 'trackDbContext.Users' hides inherited member 'AbpZeroCommonDbContext<Role, User, trackDbContext>.Users'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. access.track.EntityFrameworkCore D:\track\aspnet-core\src\access.track.EntityFrameworkCore\EntityFrameworkCore\trackDbContext.cs 20 Active

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @logicpulse

    It seems like you created a new entity named User using AspNet Zero Power Tools. Since it is an existing entity, you shouldn't create sucn an entity.