Sorry for the delay on response, two things
- Connector/NET doesn't support yet Code First 4.3, just 4.1 (we are working on that).
The fix will work for 4.1.
- We are still a few weeks away from a new maintenance release, please follow these steps to build Connector/NET from source:
1. First you need the following software:
- Visual Studio 2010 Professional Edition or better (you can use a trial http://www.microsoft.com/visualstudio/en-us/try
- Optionally Visual Studio Service Pak 1 (http://www.microsoft.com/en-us/download/details.aspx?id=23691).
- Visual Studio 2010 SDK (http://www.microsoft.com/en-us/download/details.aspx?id=2680 if you didn’t got VS2010 SP1 or http://www.microsoft.com/en-us/download/details.aspx?id=21835
if you got it)
- NUnit, get a latest stable version (http://nunit.org/?p=download), have tested with 2.5.x, but latest versions will do too.
- TestDriven, friendly testing integrated to VS, http://www.testdriven.net/download.aspx
, (personal edition will do)
- ADO.NET Entity Framework 4.1 (http://www.microsoft.com/en-us/download/details.aspx?id=8363).
- ANTLR Integration for Visual Studio (the parser for mysql grammar is written in ANTLR).
Get “ANTLR Language Support“ for Visual Studio from http://visualstudiogallery.msdn.microsoft.com/25b991db-befd-441b-b23b-bb5f8d07ee9f
, latest version.
No need to download the runtime for ANTLR, it is already included in Connector/NET source distribution.
2. Install everything
3. Pick the last release from Connector/NET from http://dev.mysql.com/downloads/connector/net/
, for example 6.5.4, choose to download the src package instead of the msi ((mysql-connector-net-6.5.4-src.zip).
4. Create a key for sign assemblies (if you want to install on the GAC) by openning a Visual Studio prompt and running this commands
sn -k cnet.snk
sn -i cnet.snk ConnectorNet
sn -p cnet.snk pubkeybinary
sn -tp pubkeybinary > pubkey.txt
5. From the place where you have unzipped Connector/NET source, open the solution MySqlClient.sln
6. You need to reedit the public key used for all InternalsToVisble attributes, they are in the AssemblyInfo.cs file for the following projects
The public key is the one from pubkey.txt from step 4., change it like shown below
[assembly: InternalsVisibleTo("MySql.Data.Entity, PublicKey =<your new public key here> )]
(Ensure that the 320 chars public key is in a single line, without carriage return, spaces, etc.)
7. Now you should be able to build everything
(You can ignore the errors in the EDMX files: Error 175: the specified store provider cannot be found in the configuration, or is not valid.)
8. At this point you have the following assemblies built.
MySql.Data.dll (core ADO.NET provider)
MySql.Data.Entity.dll (entity framework support)
MySql.Web.dll (ASP.NET providers)
Mysql.VisualStudio.dll (VS Integration)
8. At this point you can apply the fix, and rebuild.