I want my mvc application to connect to MySQL
database and I have done the following steps since morning but am missing something.
- Installed
MySQL
Connector for.Net
(ConnectorODBC
5.3) - Installed (
MySQL
for Visual Studio 1.2.6) - Followed the tutorial
https://learn.microsoft.com/en-us/aspnet/identity/overview/getting-started/aspnet-identity-using-mysql-storage-with-an-entityframework-mysql-provider#configure-entityframework-to-work-with-a-mysql-database
- nuget installed entityframework 6.1.3
now when I run the website and try to register, it crashed saying
Could not load type 'System.ComponentModel.DataAnnotations.Schema.IndexAttribute' from assembly 'EntityFramework, Version=6.0.0.0
my .csproj file contains
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="MySql.Data.Entity, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
<Reference Include="MySql.Data.Entity.EF6">
<HintPath>..\packages\MySql.Data.Entity.6.9.9\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
</Reference>
My application references include:
- EntityFramework
- EntityFramework.SqlServer
- Microsoft.AspNet.Identity.EntityFramework
- MySql.Data
- MySql.Data.Entity.EF6
I also added
MySql.Data.Entity
from the assemblies in (MySQL
for Visual Studio 1.2.6)
I am new to both MVC and MySQL
. So, don't have a clear picture of what could go wrong.
UPDATE Someone suggested on another post that i need to remove it from the gacutil. Now gacutil is saying i need admin privileges to remove an assembly which already have.. Is there a work around? is this the right-solution?