Wednesday 15 January 2014

ASP.net vNext and Entity Framework 6 -


Is it possible to run EF 6 under pre-release ASP.NET vNext? EF7 does not require certain features, but I want to prototype my application in the .NET Core.

I get the following error:

  FileLoadException: requires a strongly named assembly. (Exception from HRESULT: 0x80131044) unknown location FileLoadException: file or assembly 'EntityFramework.SqlServer, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' could not be a load of its dependencies require a strongly named assembly is. (Exception from HRESULT: 0x80131044)  

I know that the .NET core does not support strongly-named assembly, but as far as I know I run the server under the aspnet50 framework I'm from Aspnetcore50

My project. Jason looks like this:

  {"webroot": "wwwroot", "version": "1.0.0- *", "dependency": {"EntityFramework": "6.1.1 "," Microsoft.AspNet.Mvc ":" 6.0.0-beta3 ", / *" Microsoft.AspNet.Mvc.WebApiCompatShim ":" 6.0.0-beta3 ", * /" Microsoft. Spnet. Diagnostics ":" 1.0 0.0-beta-3 "," Microsoft. Spnet. Diagnostics. Antiti ":" 7.0.0-beta 3 "," Microsoft. Spnet. Aiandentiti. Antitifremvrk ":" 3.0.0 -bita 3 "," Microsoft. Spnet. Security Cookies ":" 1.0.0-Beta 3 "," Microsoft. Aspen.net Server. "1.0.0-Beta 3", "Microsoft. Espennate.Swarver.ViewListener": "1.0.0-Beta 3", "Microsoft. Espnet StaticFile": "1.0.0-Beta 3", "Microsoft . framework. configuration Moodel. Jason ":" 1.0.0-beta 3 "," Microsoft.Framework.CodeGenerators.Mvc ":" 1.0.0-beta3 "," Microsoft.Framework.Logging ":" 1.0.0-beta3 "," Microsoft.Framework.Logging.Console ":" 1.0.0-beta3 "," Microsoft. visual Studio. web Brosr link. Loder ":" 14.0.0 beta 3 "," tricycle. Sclplatform. Antitize framework ":" 1.0.0- * "}," Command ": {/ * Change port number when you are hosting this app * /" web "on your own:" Microsoft.AspNet.Hosting --server Microsoft.AspNet .Server.WebListener --server.urls http: // localhost: 5000 "," gen ":" Microsoft.Framework ("Tricycle.Studio.ContentManager.Client": "1.0.0- *"}}, // " aspnetcore50 ": {}}" {0}. "," structure ": {" aspnet50 ": {" dependency "," exclude ": [" wwwroot "," node_modules "," bower_components "]," Bndlanukrmit to " : ["Node_module", "power_companies", "** .kproj", "**. User" "", "script": {"poststrore": ["npm install"], "ready": [" Pure Boar: Install "]}}  

EF classes are defined in a separate project (Tricycle.Studio.ContentManager.Client) with the following project: JSON:

with Microsoft.AspNet.Identity.EntityFramework EF6 because it relies on EF7 Is.

Depending on your project.json file, runtime will be both EF 6 and EF7 (due to identity) behavior is unpredictable.

In addition, do not mix beta 2 and beta 3 packages. This is a guarantee problem.


No comments:

Post a Comment