用的是自己编译出来的基于coreclr的dnx,在ubuntu上运行,错误信息如下:
System.MissingMethodException: Method not found: 'Boolean Microsoft.Framework.DependencyInjection.ServiceCollectionExtensions.TryAdd(Microsoft.Framework.DependencyInjection.IServiceCollection, System.Collections.Generic.IEnumerable`1<Microsoft.Framework.DependencyInjection.ServiceDescriptor>)'. at Microsoft.Framework.DependencyInjection.EntityFrameworkServiceCollectionExtensions.AddEntityFramework(IServiceCollection serviceCollection) at CNBlogs.AboutUs.Web.Startup.ConfigureServices(IServiceCollection services)
dnx的git commit是3f37d05
将Entity Framework升级为7.0.0-beta6-13752之后,问题解决。
"dependencies":{ "EntityFramework.SqlServer": "7.0.0-beta6-13752", "EntityFramework.Commands": "7.0.0-beta6-13752" }