问题描述
我正在尝试为程序集中的第二个DBContext构建迁移类。使用以下命令: Add-Migration AlertInitial -c Axper.Data.Persistence.Context.AlertContext
并使用包控制台管理
I'm trying to build the migration classes for a second DBContext in a assembly. using this command: Add-Migration AlertInitial -c Axper.Data.Persistence.Context.AlertContext
and using the "Package Console management"
但是失败并给我这个错误:
But it fail and give me this error:
使用
包管理器控制台的目标程序将目标项目更改为迁移项目。默认项目下拉列表,或
在包含迁移
项目的目录中执行 dotnet ef。
Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.
我无法弄清楚该错误的含义以及解决方法。
有人可以帮忙吗?
I can't figure what this error mean, and what to do to fix it.Can someone help?
推荐答案
由于未知原因,我的项目/解决方案文件夹已损坏。我删除了我,然后重新克隆了Git存储库。我终于可以进行迁移了。
For unknown reason, my projects/Solution folder was kind of corrupted. I deleted I and re-cloned the Git Repository. I i finally been able to do the migration.
这篇关于迁移“我们的目标项目'xxx'与您的迁移程序集'xxx'不匹配”使用aspnet Core 1.0 RC2-的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!