© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
Youssef M

Entity Framework Core can't create a migration

Hello fam, I'm encountering an issue when trying to run an Entity Framework Core migration (Microsoft.EntityFrameworkCore 8.0.1).

The error is:

Error MSB4057: The target "GetEFProjectMetadata" does not exist in the project. Unable to retrieve project metadata. Ensure it's an MSBuild-based .NET Core project. If you're using custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option.
Error MSB4057: The target "GetEFProjectMetadata" does not exist in the project. Unable to retrieve project metadata. Ensure it's an MSBuild-based .NET Core project. If you're using custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option.


I've run migrations successfully before with the same configuration, and the only changes I made were to my entity classes; I haven't modified any path values.

The command I'm using to run the migration is:

dotnet ef migrations add CustomerEntityUpdate -p X -s Y
dotnet ef migrations add CustomerEntityUpdate -p X -s Y
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Entity Framework migration
C#CC# / help
4y ago
❔ Entity framework migration problem
C#CC# / help
3y ago
❔ Entity Framework Migration Issues
C#CC# / help
3y ago
Entity Framework Migration Creation
C#CC# / help
4y ago