mercredi 29 juillet 2015

Error when try to use EntityFramework 7 + SQLite on OSX

I'm try to use EntityFramework 7 + SQLite on a sample App with .Net Core on a Mac OSX environment. I have installed the Mono 4.0.2 and .Net Version Manager, this is my "dnvm list" command result:

   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

When a try to execute some EntityFramework.Command, the follow problem occurs:

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'.

The full stack is:

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'. at 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

Aucun commentaire:

Enregistrer un commentaire