Hi, I have an ERD diagram, and I am trying to generate a C# library to be used in an application. It uses MySQL.
All the process is ok, except, if I use a form to do any changes to the DB, I get the exception: "The dialect was not set. Set the property hibernate.dialect."
in the folowing row:
I had this same problem as well. The solution for this is on page 2-11 (Step 14) of the DB-VA Programmer’s Guide for .NET. A better solution than copying it manually would be:
VISUAL STUDIO 2005
Copy it to the project directory
App -> Project -> Add -> Existing Item
Select “hibernate.cfg.xml”
In “hibernate.cfg.xml” properties
a. change Build Action to "None"
b. change Copy to Output Directory to “Always”
Embedding the hibernate.cfg.xml as a resource did not work for me in Visual Studio 2005.
Actually, I just updated my db schema, and realized that the .xml file didn’t update. Adding a line like this to the post-build step is the best way to go: