Getting sqlite to work in ASP.NET 5 (vnext)

.net-core asp.net asp.net-core-mvc entity-framework-core sqlite

Question

I'm trying to get "EntityFramework.SQLite": "7.0.0-beta1" to work within ASP.NET 5.

I've created my project using Yeoman and installed EF sqlite from the package manager.

The project builds fine but when running I get:

Could not load file or assembly 'Microsoft.Framework.Logging.ILogger, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'or one of its dependencies.

My project.json:

"dependencies": {
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta5",
    "Microsoft.AspNet.Mvc": "6.0.0-beta5",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta5",
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta5",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta5",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta5",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta5",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta5",
    "Microsoft.Framework.Configuration.Json": "1.0.0-beta5",
    "Microsoft.Framework.Logging": "1.0.0-beta5",
    "Microsoft.Framework.Logging.Console": "1.0.0-beta5",
    "Kestrel": "1.0.0-beta5",
    "EntityFramework.SQLite": "7.0.0-beta1"
},

I'm suspecting a versioning issue here

Things I've tried :

Tried using beta5 for EF only to have other packages breaking. I've also changed "Microsoft.Framework.Logging": "1.0.0-beta5" to the latest and got to the point where the db created successfully but then broke when it got to services.AddMvc();

I've checked the sample project into git hub: https://github.com/roboriaan/asp567

Any help would be really appreciated. Thanks

Accepted Answer

Wait for beta 6, that includes proper SQLite support and samples. Beta 6 comes tomorrow! (July 27)


Popular Answer

Here is an Example https://github.com/Schr3da/ASP.net-vnext-samples project which modifies the asp.net Mvc sample to work with Sqlite

https://github.com/Schr3da/ASP.net-vnext-samples

regards Schreda




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why