如何解决“添加迁移:找不到与参数名称” ContextTypeName”匹配的参数”

时间:2019-04-13 00:39:19

标签: c# asp.net-core entity-framework-6 ef-code-first

我的项目中有两个DbContext,我试图运行EF Add-Migration指向一个特定的DbContext,但是遇到以下错误。

Add-Migration Initial -ContextTypeName System.BLL.Contexts.TenantDbContext


Add-Migration : A parameter cannot be found that matches parameter name 'ContextTypeName'.
At line:1 char:23
+ Add-Migration InitialCreation -ContextTypeName System.BLL.Contexts.TenantDbCo ...
+                       ~~~~~~~~~~~~~~~~
   + CategoryInfo          : InvalidArgument: (:) [Add-Migration], ParameterBindingException
   + FullyQualifiedErrorId : NamedParameterNotFound,Add-Migration

我还从下拉列表中指定了默认项目。

0 个答案:

没有答案