© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
6 replies
M B V R K

✅ Adding EF Core Migration Error

Hi friends,
I have a solution contains the structure mentioned in the attached screen-shot,
All the projects are
Class Library
Class Library
, except the
WEB
WEB
project is an
ASP.Net Core 7 Angular
ASP.Net Core 7 Angular
APP.

The issue:
In the
EF Core
EF Core
project I have setup the
EF Core
EF Core
DBContext
DBContext
, and the
WEB
WEB
project contains the
Conenction String
Conenction String
in the
AppSettings.Json
AppSettings.Json
.
When I try
dotnet ef migration add Initial
dotnet ef migration add Initial
command I get the following error :
Unable to create an object of type 'AppDbContext'. For the different patterns supported at design time, see ...

Note:
I'm using the
VS Code
VS Code
IDE,

Question:
Please how do I can solve this issue ?

Massive thanks in advance.
image.png
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

EF Error when adding migration
C#CC# / help
3y ago
Migration issues -EF core.
C#CC# / help
16mo ago
EF Migration error
C#CC# / help
4y ago
❔ EF Core Add Migration issue
C#CC# / help
4y ago