Page 1 of 1

EF6/mono success and gotchas

Posted: Tue 01 Oct 2013 19:22
by MolallaComm
Using the mono 3.2.3 runtime provided here:

http://ppa.launchpad.net/ermshiperete/m ... eta/ubuntu

I was able to get a fairly substantial code first EF6 program working with mono and the mysql provider. It would have worked first try but my VS2012 project didn't have a reference to Devart.Data in it (only Devart.Data.MySql and Devart.Data.MySql.Entity). I presume when I run the app on Windows, since Devart.Data in the GAC it just finds those dependencies automatically, but with mono, you will get a "Can't load assembly Devart.Data.MySql error" with no other explanation. Adding a reference to Devart.Data and redeploying fixed it.

In summary, the only changes necessary to deploy EF6 projects to mono verses Windows is:

1. Make sure you reference Devart.Data, Devart.Data.MySql, and Devart.Data.MySql.Entity.
2. Set "Copy Local" on all three of those references.
3. Rebuild and deploy

Just writing this up because it took me about an hour to figure the "Can't load assembly Devart.Data.MySql" error and there doesn't seem to be much current information about using these libraries with mono.

Re: EF6/mono success and gotchas

Posted: Thu 03 Oct 2013 09:51
by Shalex
Thank you for sharing your experience. Here is another feedback which may help you in further development: http://forums.devart.com/viewtopic.php?f=30&t=25699. If you encounter any problems, feel free to contact us.