Я получаю следующее сообщение об ошибке на всех страницах моего веб-сайта:Не удалось создать код. Не удалось загрузить файл или сборку «MySql.Data, Version = 6.6.5.0
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Failed to generate code. Could not load file or assembly 'MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 1: <?xml version="1.0" encoding="utf-8"?>
Line 2: <xs:schema id="newsarticles" targetNamespace="http://tempuri.org/news.xsd" xmlns:mstns="http://tempuri.org/news.xsd" xmlns="http://tempuri.org/news.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
Line 3: <xs:annotation>
Source File: /App_Code/news.xsd Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
я проверил сборки в моем web.config, но нет ссылок на MySQL:
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<clear />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /></assemblies>
</compilation>
Затем я проверил ссылки на мой проект на сайте. Там я заметил, что многие разные версии MySQL ссылаются. Я попытался удалить все ссылки, кроме версии 6.7.4.0, однако я даже не могу удалить ссылки (см. Снимок экрана).
У меня есть эти файлы в моей папке BIN, обе версии 6.7.4.0:
MySql.Data.dll
и MySql.Data.Entity.dll
Как исправить эту ошибку?
Возможный дубликат (или связанный): http://stackoverflow.com/questions/18882217/mysql-connector-6-7-4-and-entity-framework -5-исключения – Nate