【问题标题】:Adding migrations: System.MissingMethodException: Method not found ILibraryManager添加迁移:System.MissingMethodException:找不到方法 ILibraryManager
【发布时间】:2016-04-17 23:58:26
【问题描述】:

完全错误:

System.MissingMethodException:找不到方法: 'Microsoft.Extensions.PlatformAbstractions.ILibraryManager Microsoft.Extensions.PlatformAbstractions.PlatformServices.get_LibraryManager()'。 在 Microsoft.Data.Entity.Commands.Program.ValidateProject(字符串 目标项目)在 Microsoft.Data.Entity.Commands.Program.c__DisplayClass2_7.b__15() 在 Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(字符串 [] args) 在 Microsoft.Data.Entity.Commands.Program.Main(String[] args) --- 从先前抛出异常的位置结束堆栈跟踪 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(程序集 程序集,字符串 [] 参数,IServiceProvider 服务提供者)在 Microsoft.Dnx.ApplicationHost.Program.c__DisplayClass3_0.b__0() 在 System.Threading.Tasks.Task`1.InnerInvoke() 在 System.Threading.Tasks.Task.Execute()

我尝试运行的命令:

dnx ef 迁移添加 test1

EF 命令的版本:

实体框架命令 7.0.0-rc1-16348

dnx 版本:

Microsoft .NET 执行环境 Clr-x86-1.0.0-rc2-16595

我的项目目前使用 RC1。这一切以前都奏效了。

【问题讨论】:

  • 您必须将解决方案的所有部分更新到相同的构建级别
  • @ErikEJ 所以,假设我想在 RC1 上工作:我应该改变什么才能让它工作? global.json 设置为 rc1-update1,所有依赖项也适用于 rc1
  • 还有其他地方需要我检查版本是否正确吗?
  • 看起来 dnx 不是 rc1!
  • 那么怎么改呢?它认为它可以在 global.json 中完成,但我那里有“1.0.0-rc1-update1”版本。一切都应该没问题。

标签: asp.net entity-framework asp.net-core


【解决方案1】:

大多数情况下,问题在于您将 RC1 包与 RC2 运行时混合在一起。将运行时降级到 RC1 或从 dnx 切换到 dotnet 并将软件包升级到 RC2

【讨论】:

    猜你喜欢
    • 2011-04-01
    • 2011-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-25
    • 2020-11-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多