Description
Upon trying to create migrations in a MAUI + Blazor project, you are met with an error message "The specified deps.json does not exist"
MAUI seems to not generate this file unlike a normal .NET 6 project, and EntityFramworkCore depends on this file for creating or applying migrations.
This only happens when targeting mobile only on MAUI (including mac), UWP is likely unaffected.
Steps to Reproduce
-
Open Visual Studio 2022 Enterprise with MAUI installed (as instructed here)
-
Create a new .NET MAUI Blazor App project
-
Unload/Delete the WinUI project (not necessary, but UWP is not needed for this project)
-
Right click your MAUI project to Properties and change Target frameworks from net6.0-ios;net6.0-android;net6.0-maccatalyst to net6.0-android -- Target OS and Target OS version should automatically change (sometimes it's not immediate after you save, you might have to close the properties window and re-open before you see it change)
-
Add the following packages to your project via your .csproj file (you can alternatively download the respective current preview versions of these packages manually via the package manager):
- Microsoft.EntityFrameworkCore.Sqlite - Version: 6.0.0-*
- Microsoft.EntityFrameworkCore.Design - Version: 6.0.0-*
- Microsoft.EntityFrameworkCore.Tools- Version: 6.0.0-*
- Open the Data folder in your MAUI solution and create a simple class:
Test.cs
using System.ComponentModel.DataAnnotations;
namespace Mauitest2.Data
{
public class Test
{
[Key]
public int ID { get; set; }
public string Name { get; set; }
}
}
- Create ApplicationDbContext.cs in your Data folder
using Microsoft.EntityFrameworkCore;
namespace Mauitest2.Data
{
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
{
}
public DbSet<Test> Tests { get; set; }
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Add entity relationship configurations
builder.Entity<Test>().HasKey(x => x.ID);
}
}
}
- Add your database service in your Startup.cs
services.AddDbContext<ApplicationDbContext>(options =>
{
options.UseSqlite("Data Source = Test.db");
});
It will look like the following:

-
Open the Package Manager Console in your project (View -> Other Windows -> Package Manager Console)
-
Type "Add-Migration Initial" and press Enter
-
Both Add-Migration and Update-Database both pass the build, but immediately fail afterwards with "The specified deps.json [project path\bin\debug\net6.0-android\project name.deps.json] does not exist" and no migration is created.
Expected Behavior
Add-Migration should create a migration based on the project that the EntityFrameworkCore database is setup on (in this case, MAUI)
Update-Database should apply an existing migration built by Add-Migration and build a SQLite database.
Actual Behavior
Both Add-Migration and Update-Database both pass the build, but immediately fail afterwards with "The specified deps.json [project path\bin\debug\net6.0-android\project name.deps.json] does not exist" and no migration is created or applied.
Basic Information
- Version with issue: net6.0-android, Microsoft.Maui - 6.0.100-preview.5.794
- Last known good version: .NET 6 Standard project
- IDE: Visual Studio 2022 Enterprise Preview Version 17.0.0 Preview 3.1
- Platform Target Frameworks:
- iOS: N/A
- Android: net6.0-android -- Version 30 (Android 11)
- UWP: N/A
- Android Support Library Version: net6.0-android -- Version 30 (Android 11)
- Nuget Packages:
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-preview.7.21378.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="6.0.100-preview.5.794" />
<PackageReference Include="Microsoft.Maui" Version="6.0.100-preview.5.794" />
</ItemGroup>
- Affected Devices: All MAUI-specific projects.
Screenshots

Workaround
No current workaround known -- possible you can create the migrations in a different project in .NET 5, or .NET 6 and port them over to your MAUI project, including the SQLite database created.
Description
Upon trying to create migrations in a MAUI + Blazor project, you are met with an error message "The specified deps.json does not exist"
MAUI seems to not generate this file unlike a normal .NET 6 project, and EntityFramworkCore depends on this file for creating or applying migrations.
This only happens when targeting mobile only on MAUI (including mac), UWP is likely unaffected.
Steps to Reproduce
Open Visual Studio 2022 Enterprise with MAUI installed (as instructed here)
Create a new .NET MAUI Blazor App project
Unload/Delete the WinUI project (not necessary, but UWP is not needed for this project)
Right click your MAUI project to Properties and change Target frameworks from
net6.0-ios;net6.0-android;net6.0-maccatalysttonet6.0-android-- Target OS and Target OS version should automatically change (sometimes it's not immediate after you save, you might have to close the properties window and re-open before you see it change)Add the following packages to your project via your .csproj file (you can alternatively download the respective current preview versions of these packages manually via the package manager):
Test.cs
It will look like the following:

Open the Package Manager Console in your project (View -> Other Windows -> Package Manager Console)
Type "Add-Migration Initial" and press Enter
Both Add-Migration and Update-Database both pass the build, but immediately fail afterwards with "The specified deps.json [project path\bin\debug\net6.0-android\project name.deps.json] does not exist" and no migration is created.
Expected Behavior
Add-Migration should create a migration based on the project that the EntityFrameworkCore database is setup on (in this case, MAUI)
Update-Database should apply an existing migration built by Add-Migration and build a SQLite database.
Actual Behavior
Both Add-Migration and Update-Database both pass the build, but immediately fail afterwards with "The specified deps.json [project path\bin\debug\net6.0-android\project name.deps.json] does not exist" and no migration is created or applied.
Basic Information
Screenshots
Workaround
No current workaround known -- possible you can create the migrations in a different project in .NET 5, or .NET 6 and port them over to your MAUI project, including the SQLite database created.