Base solution for your next web application
Open Closed

Error generating Entity via Powertools #10135


User avatar
0
hrod761 created
  • 10.2.0
  • Angular
  • .NetCore

///////////////////////////////////////////////////////////////////

Hello, im getting the attched error when using ASP.Net Zero powertools to create a new enity.


4 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @hrod761

    It seems like your project has build error. Can you please open a command prompt in your mvc project's folder and run dotnet build and share the error that you faced.

  • User Avatar
    0
    hrod761 created

    Hello,

    Thanks for your response, however I can run the project and duilds sucessfully, swagger shows the new entity - it's just not creating the migration or updating the database. What folder are you refering to "mvc" ? this project is .netcore + angular. Please advise.

  • User Avatar
    0
    musa.demir created

    What folder are you refering to "mvc" ?

    Sorry about that, I missed that part. I meant Host project. Since your project builds successfully, can you please share related part of the log file of PowerTools.(it is located in C:\Users\%username%\AppData\Roaming\AspNetZero\PowerTools\Logs).


    Also, can you please open a command prompt in your EntityFrameworkCore project's folder and run dotnet ef to check if your pc has entity framework. If it works correctly then try to add migration manuelly. Open a command prompt in your EntityFrameworkCore and run dotnet ef migrations add "YOURMIGRATIONNAME" and share the result.

  • User Avatar
    0
    AuroraBMS created

    Running this command will resolve you EF issue: dotnet tool install --global dotnet-ef