Problem plugging MySql Connector/Net into Photon Server

Options
czebrose
edited June 2012 in Photon Server
I'm trying to have a Photon Server connect to a MySql database via MySql Connector/Net.

Right now, I've been able to add a custom operator to the Lite Server Application and get that to work with the Unity Client. I've also been able to make a C# Win32 Console Program which uses the MySql Connector/Net v4.0 to grab the version of the MySql database.

However, I get an error when I add a Reference to the MySql.Data.dll file, add 'using MySql.Data' to the Lite namespace in LitePeer.cs, and try building the Lite Solution. The error is
The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)

Also, the line containing 'using MySql.Data' now has an error on it (which it didn't have prior to building the solution). Cleaning the solution doesn't solve the problem.

I've found that if I remove the reference .dll and re-reference it, then Visual Studio 2010 can see the MySql library again (at least until I build again).

Has anyone been able to get MySql to work with Lite, any suggestions would be appreciated.

Comments

  • BenStahl
    Options
    The Lite project is Targeting the .Net Framework 3.5. If you want to reference the .Net 4.0 version of the MySql.Data.dll you have to change the lite project to target the net 4.0 frame work also.