Skip to content

The Getting Started guide does not work well #152

@eagle-k

Description

@eagle-k

Describe the bug
Follow https://github.com/efcore/EFCore.FSharp/blob/master/GETTING_STARTED.md, and dotnet ef migrations add Initial fails.

Build started...
Build succeeded.
System.MissingMethodException: Method not found: 'System.String Microsoft.EntityFrameworkCore.Design.ICSharpHelper.Fragment(Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment, System.String, Boolean)'.
   at EntityFrameworkCore.FSharp.EFCoreFSharpServices.Microsoft.EntityFrameworkCore.Design.IDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection services)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureDesignTimeServices(Type designTimeServicesType, IServiceCollection services)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureReferencedServices(IServiceCollection services, String provider)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.CreateServiceCollection(DbContext context)
   at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(DbContext context)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType, String namespace)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType, String namespace)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Method not found: 'System.String Microsoft.EntityFrameworkCore.Design.ICSharpHelper.Fragment(Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment, System.String, Boolean)'.

To Reproduce
I will share the actual repository where the error occurred.
https://github.com/eagle-k/FsEfTest

Expected behavior
dotnet ef migrations add Initial succeeds.

Desktop (please complete the following information):

  • OS: Windows 10
  • .NET CLI Version 7.0.100
  • Entity Framework Core .NET Command-line Tools 7.0.0
  • Paket version 7.2.0+bb14ab674b2748070a624f394cd6796e11aaffa8

Additional context

dotnet ef dbcontext info succeeds.

Build started...
Build succeeded.
Type: BloggingModel+BloggingContext
Provider name: Microsoft.EntityFrameworkCore.Sqlite
Database name: main
Data source: blogging.db
Options: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions