Troubleshooting Microsoft.Extensions.Hosting Service Access Error

Introduction

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\Rasool Ijas Ahamed\source\repos\ReactAsp\ReactAsp\appsettings.json'. Unable to create an object of type 'StudentDbContext.' For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728.

PackageManager

Step 1. Solution Explorer Right Click manage nuget packages for solution.

NugetPackage

Step 2. Search Microsoft.EntityFrameworkCore.Tools, then Install package.

EntityFramework

Step 3

Preview changes 1

LicenseAcceptance

Step 4. Next, select Tools, go to nuget package manager select the package manager console.

SelectPackacge

Step 5

Console

Conclusion

This article taught us Login Failed SQL Server PM>add-migration initial code error. If you have any questions, please contact me.

Thanks.


Similar Articles