小编Rog*_*gar的帖子

无法加载文件或程序集'EntityFramework,Version = 6.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'

我是ASP .NET MVC的新手。我尝试使用Entity Framework,但由于没有找到EF,因此无法使用。我搜索了一个解决方案,并在另一篇文章中说我必须更改版本。我做到了,但是没有成功。

Web.config:

  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <!--<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-SportsStore.WebUI-20150201211232;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-SportsStore.WebUI-20150201211232.mdf" />-->
    <!--<add name="EFDbContext" providerName="System.Data.SqlClient" connectionString="Data Source=(localDb)\v11.0;Initial Catalog=SportsStore;Integrated Security=True" />-->
    <add name="EFDbContext" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-SportsStore.WebUI-20150201211232;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-SportsStore.WebUI-20150201211232.mdf" />
  </connectionStrings>
Run Code Online (Sandbox Code Playgroud)

那是来自浏览器的错误。

“ /”应用程序中的服务器错误。

Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the …
Run Code Online (Sandbox Code Playgroud)

c# asp.net asp.net-mvc entity-framework entity-framework-4

3
推荐指数
1
解决办法
5762
查看次数