I'm encountering an issue while running Scaffold-DbContext using Entity Framework Core 7.0.14; I'm getting an error message
There was an error running the selected code generator package restore failed rolling back package change for
I'm curious about what steps I should take to resolve this issue.
Versions I'm using:
- .NET Core 7
- Entity Framework Core 7.0.14
- Project GitHub link: GitHub Link
- Visual Studio 2022
Does anyone have any help or suggestions regarding this issue? Thank you in advance.
public class ApplicationDbContext : IdentityDbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
{
}
public DbSet<Category> Categories { get; set; }
public DbSet<Product> Products { get; set; }
public DbSet<ProductPrice> ProductPrices { get; set; }
public DbSet<OrderDetail> OrderDetails { get; set; }
public DbSet<OrderHeader> OrderHeaders { get; set; }
}
I attempted to generate a DbContext using Scaffold-DbContext in Entity Framework Core 7.0.14 within my .NET Core 7 project. I expected the command to execute successfully and create the necessary DbContext based on my database schema. However, during the process, I encountered an error
There was an error running the selected code generator package restore failed rolling back package change for
Despite multiple attempts, I couldn't resolve this issue. Seeking advice on resolving this error in the context of .NET Core 7 and Entity Framework Core 7.0.14
Your
"Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.11"is not compatible with your EF core version, you need to modify theEF corerelating packages to7.0.12E_Commerce_Sercer
E_Commerce-DataAccess