0

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

2 Answers 2

1

ILibraryInformation was renamed recently, and the DNX beta7 you're using probably includes this change: make sure to also reference recent beta7 packages in your project.json file.

You can use the wildcard to reference the latest version:

"dependencies": {
    "EntityFramework.Sqlite": "7.0.0-*"
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @Pinpoint, I put on another answer here in this question a detailed information, could you check ??
0

Because of project renames, nightly builds are currently broken. To use just beta6, you may need to try these steps:

  • Remove ~/.dnx/packages. Some of these may contain a mix of post- and pre-rename references.
  • Ensure you are not using the nightly nuget feed (myget.org)
  • dnvm use 1.0.0-beta6
  • Make sure you are using "EntityFramework.Commands": "7.0.0-beta6" and "EntityFramework.Sqlite": "7.0.0-beta6" in project.json.
  • Follow the Workarounds in the Getting Started on OS X guide.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.