【发布时间】:2015-11-05 00:56:50
【问题描述】:
我正在尝试在 Visual Studio 2015 RTM 中使用 ASP.NET 5 beta5 和 Entity Framework 7 beta6。问题是即使完全遵循这样的指南,我也无法让它们一起运行: http://ef.readthedocs.org/en/latest/getting-started/aspnet5.html
在这个例子中,当我到达我需要运行这个命令的部分时:
dnx . ef migration add MyFirstMigration
我总是收到这个错误:
Using context 'BloggingContext'.
System.MissingMethodException: Method not found: 'Boolean Microsoft.Framework.DependencyInjection.ServiceCollectionExtensions.TryAdd(Microsoft.Framework.DependencyInjection.IServiceCollection, Microsoft.Framework.DependencyInjection.ServiceDescriptor)'.
我尝试并重试了所有步骤,并搜索了我在项目中可能错过的任何内容。
【问题讨论】:
-
我以某种方式发现问题出在“project.json”中引用的不同 beta 版本中。其中一些在 beta5 和一些 beta6 中。但是我不明白为什么当我创建一个新的 ASP.NET 项目时,默认引用最终是从两个不同的 beta 版本中添加的。正在努力。
标签: c# asp.net entity-framework entity-framework-core