Skip to content

Failed to create migration #20800

@koeltp

Description

@koeltp

image
项目结果如上图所示。
ef core模型在一个类库中,当我Main方法调用的名称为BuildHost方法时,我在包管理器中执行
Add-Migration initcreated时,报如下错误:
image
而当我在Main方法中将BuildHost的名字改为CreateHostBuilder时,就可以成功了。
image

是因为有这样的约定,还是是一个bug。

Steps to reproduce

Further technical details

EF Core version:3.1.3
Database provider: Pomelo.EntityFrameworkCore.MySql
Target framework: .NET Core 3.1
Operating system:win10 1903
IDE: Visual Studio 2019 16.5.4

谢谢

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions