Replies: 1 comment
-
These steps actually work on a net8.0 project with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Creating a new project and trying to add migrations gives me the following error. Any idea how to solve this?
These are the steps I'm performing
1/ Create the database in PostgreSQL.
2/ Create new project in VS - ASP.NET Core Web App (Model-View-Controller)
3/ Changed the project details for only the following
WebApplication1.csproj: add nuget Npgsql.EntityFrameworkCore.PostgreSQL
Update connection string - this is definitely correct as works with other projects.
Change db context:
Add OnModelCreating to seed database with default identity:
Delete existing migrations
Run the following commands in Package Manager Console:
Not sure if it's an issue but original project created the migration in path
..\Data\Migrations
but Add-Migration adds it to parent project path..\Migrations
Beta Was this translation helpful? Give feedback.
All reactions