【发布时间】:2020-01-08 09:14:54
【问题描述】:
我正在使用 dotnet core 2 和 Visual Studio 2019,并且我有几个数据库上下文。但我想向 MedicalDbContext 添加迁移。而且我还有更多的默认项目。但正确的默认项目是 HepEngine。所以我在包管理器中选择该项目作为默认项目。
并在命令提示符下:PM>Add-Migration add-echeq-alert-action-extraProperty -c medicalDbContext -s
然后我得到这个错误:
Add-Migration : Missing an argument for parameter 'StartupProject'. Specify a parameter of type 'System.String' and try again.
At line:1 char:72
+ ... Migration add-echeq-alert-action-extraProperty -c medicalDbContext -s
+ ~~
+ CategoryInfo : InvalidArgument: (:) [Add-Migration], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,Add-Migration
那么我必须改变什么?谢谢
【问题讨论】:
标签: visual-studio asp.net-core entity-framework-migrations package-managers