【发布时间】:2015-10-20 15:37:41
【问题描述】:
我正在尝试在 Mac OSX 环境中使用 .Net Core 的示例应用程序上使用 EntityFramework 7 + SQLite。我已经安装了 Mono 4.0.2 和 .Net 版本管理器,这是我的“dnvm list”命令结果:
1.0.0-beta7-12274 coreclr x64 darwin
1.0.0-beta6 mono linux/darwin default
1.0.0-beta7-12274 mono linux/darwin
* 1.0.0-beta7-12275 mono linux/darwin
当尝试执行一些 EntityFramework.Command 时,会出现以下问题:
System.TypeLoadException: Could not load type 'Microsoft.Framework.Runtime.ILibraryInformation' from assembly 'Microsoft.Framework.Runtime.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
完整的堆栈是:
System.TypeLoadException:无法从程序集“Microsoft.Framework.Runtime.Abstractions,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”加载类型“Microsoft.Framework.Runtime.ILibraryInformation”。
在 Microsoft.Data.Entity.Commands.Program.Execute (System.String startupProject, System.Func1 invoke) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Commands.Program.AddMigration (System.String name, System.String context, System.String startupProject) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Commands.Program+<>c__DisplayClass10_1.<Main>b__7 () [0x00000] in <filename unknown>:0
at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in <filename unknown>:0
at Microsoft.Data.Entity.Commands.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in <filename unknown>:0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
at dnx.host.Bootstrapper.RunAsync (System.Collections.Generic.List1 args, IRuntimeEnvironment env, System.Runtime.Versioning.FrameworkName targetFramework) [0x00000] in :0
【问题讨论】:
标签: macos sqlite asp.net-core entity-framework-core dnx