开发者社区> 问答> 正文

EF数据迁移报错,执行Enable-Migrations 命令出现异常?报错

执行 Enable-Migrations 命令出现异常,原因是什么?如何解决?

PM> Enable-Migrations
System.ArgumentException: 参数错误。 (异常来自 HRESULT:0x80070057 (E_INVALIDARG))

Server stack trace: 
   在 EnvDTE.Properties.Item(Object index)
   在 System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   在 System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   在 EnvDTE.Properties.Item(Object index)
   在 System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetPropertyValue[T](Project project, String propertyName)
   在 System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory)
   在 System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName)
   在 System.Data.Entity.Migrations.EnableMigrationsCommand.<>c__DisplayClass2.<.ctor>b__0()
   在 System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
参数错误。 (异常来自 HRESULT:0x80070057 (E_INVALIDARG))



展开
收起
爱吃鱼的程序员 2020-06-15 19:42:54 1019 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    thisisadeceptiveerror,yougetthiswhentryingtoperformtheenable-migrationsona website,thisneedstobeperformedona webapplication

    2020-06-15 19:43:13
    赞同 展开评论 打赏
问答分类:
C#
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载