© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
24 replies
TJFrags

❔ Update-Database causing error

Hi, When I try to use the "Update-Database" command in visual studio an error occures:

An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Failed to load configuration from file 'C:\Users\Pc\source\repos\GamersRisingWeb\GamersRising\appsettings.json'.
Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

This started after changing a migration file but now I still get the error after changing it back. Is there a way to fix this without restarting?
Design-time DbContext Creation - EF Core
Strategies for creating a design-time DbContext with Entity Framework Core
Design-time DbContext Creation - EF Core
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

❔ Update-Database error
C#CC# / help
4y ago
❔ Update-database error
C#CC# / help
4y ago
error when Update-Database
C#CC# / help
2y ago
✅ Database-Update problem
C#CC# / help
10mo ago