ASP.NET vNext with EntityFramework.Core

asp.net-core entity-framework-core

Question

In my ASP.NET vNext project I'm using 2 dependencies from Entity Framework 7, which are :

  • "EntityFramework.SqlServer": "7.0.0-beta1"
  • "EntityFramework.Commands": "7.0.0-beta1"

I want to use the beta2 release, and so I added a third dependency which is "EntityFramework.Core": "7.0.0-beta2". So I have :

  • "EntityFramework.SqlServer": "7.0.0-beta2"
  • "EntityFramework.Commands": "7.0.0-beta2"
  • "EntityFramework.Core": "7.0.0-beta2"

But Visual Studio throw an error :

Error - CS0121 - The call is ambiguous between the following methods or properties: 'Microsoft.Framework.DependencyInjection.EntityServiceCollectionExtensions.AddEntityFramework(Microsoft.Framework.DependencyInjection.IServiceCollection, Microsoft.Framework.ConfigurationModel.IConfiguration)' and 'Microsoft.Framework.DependencyInjection.EntityServiceCollectionExtensions.AddEntityFramework(Microsoft.Framework.DependencyInjection.IServiceCollection, Microsoft.Framework.ConfigurationModel.IConfiguration)' - Startup.cs

Same error with CoreCLR ... Any ideas ?

Accepted Answer

Ok I found the solution : I changed all my beta1 dependencies to beta2 and it worked. I have another problem yet : the website doesn't show the Home page, I have a simple blank page ...

EDIT 2 : Sorry for the inconvenience, it seems that the dependency "Microsoft.VisualStudio.Web.BrowserLink.Loader" is still in beta1. It works now. Good luck ;)


Popular Answer

Yep same deal here updated through nuget all is well with that issue. The updates in my case were Microsoft.ASpNet.Server.IIS beta-1 to beta-5 and Microsoft.AspNet.Server.WebListener beta-1 to beta-4




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