ErikEJ / EFCorePowerTools

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
MIT License
2.12k stars 293 forks source link

EFCorePowerTools features do not work #169

Closed duhovich closed 5 years ago

duhovich commented 5 years ago

When choosing Migration tools an error occurs: image then: image

Parameter name: processResult at EFCorePowerTools.Handlers.ModelAnalyzerHandler.Generate(String outputPath, Project project, GenerationType generationType) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ModelAnalyzerHandler.cs:line 49

in console

Steps to reproduce

DBContext: ` using ContosoUniversity.Models;

using Microsoft.EntityFrameworkCore;

namespace ContosoUniversity.Models {

public class SchoolContext : DbContext
{

    public SchoolContext(DbContextOptions<SchoolContext> options) : base(options)
    {
    }

    public DbSet<Course> Courses { get; set; }
    public DbSet<Enrollment> Enrollment { get; set; }
    public DbSet<Student> Student { get; set; }
    public DbSet<Department> Departments { get; set; }
    public DbSet<Instructor> Instructors { get; set; }
    public DbSet<OfficeAssignment> OfficeAssignments { get; set; }
    public DbSet<CourseAssignment> CourseAssignments { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Course>().ToTable("Course");
        modelBuilder.Entity<Enrollment>().ToTable("Enrollment");
        modelBuilder.Entity<Student>().ToTable("Student");
        modelBuilder.Entity<Department>().ToTable("Department");
        modelBuilder.Entity<Instructor>().ToTable("Instructor");
        modelBuilder.Entity<OfficeAssignment>().ToTable("OfficeAssignment");
        modelBuilder.Entity<CourseAssignment>().ToTable("CourseAssignment");

        modelBuilder.Entity<CourseAssignment>()
            .HasKey(c => new { c.CourseID, c.InstructorID });
    }
}

}`

Further technical details

Version 2.2.4.0

SQL Server Compact 4.0 in GAC - No SQL Server Compact 4.0 DbProvider - No

SQL Server Compact 4.0 DDEX provider - No SQL Server Compact 4.0 Simple DDEX provider - Yes

SQLite ADO.NET Provider included: 1.0.107.0 SQLite EF6 DbProvider in GAC - No

System.Data.SQLite DDEX provider - No SQLite Simple DDEX provider - Yes

Database engine: (SQlite, SQL Compact, SQL Server, Postgres)

image

ErikEJ commented 5 years ago

Which EF Core version? Duplicate of #161 ?

ErikEJ commented 5 years ago

Only EF Core 2.1.0, 2.1.4, 2.2.0 and 2.2.1 are supported with .NET Framework based projects