Enable-Migrations Exception calling “SetData” with “2” argument(s)

后端 未结 8 1722
小鲜肉
小鲜肉 2020-11-29 09:45

I created a library based on .NET 4.6.2 version.
To the library, I\'ve added the EntityFramework version 6.1.3 package.
I created a model as follow



        
8条回答
  •  攒了一身酷
    2020-11-29 10:20

    To be free from defining startup project explicitly , you can use the command:

    Enable-Migrations -EnableAutomaticMigrations -ProjectName Components -StartupProjectName Components
    

    The parameters are:

    -ProjectName

    Specifies the project that the scaffolded migrations configuration class will be added to (configuration.cs). If omitted, the default project selected in package manager console is used.

    -StartUpProjectName

    Specifies the configuration file to use for named connection strings. If omitted, the specified project's configuration file is used.

    To get more details for the command, run:

    get-help enable-migrations -Full        
    

提交回复
热议问题