Getting "The specified deps.json [] does not exist" error when running EF commands in a Blazor WebAssembly App
14:54 15 Jun 2021

I am trying to scaffold a database in EF Core within a Blazor project. I spin up a new app in Visual Studio 2019 (v16.10.1 running NET Core 5.0) and try any EF command and I get this message:

The specified deps.json [...bin\Debug\net5.0\CourtFilings.Web.deps.json] does not exist

I've deleted the bin and obj folders, updated Visual Studio, tried copying files to root, restarted my machine after updating.

Scaffold-DbContext that has worked in the past, but is not working at all now.

This is what I try that does not work:

Scaffold-DbContext "Server=server;User Id=sa;Password=password;Database=database;" Microsoft.EntityFrameworkCore.SqlServer -ContextDir Context -OutputDir Models -Tables CourtFilings  -startupproject CourtFilings.Web

This does work in an ASP.NET Core web project, just not in Blazor. This has worked in a previous Blazor project.

asp.net-core .net-core entity-framework-core blazor scaffolding