On Mon, 2010-03-15 at 00:13 +0530, Sharique uddin Ahmed Farooqui wrote:
> I'm using openSuse 11.2, mono 6.2.1, mysql and dblinq from svn. When
> I run dbmetal to generate code i get this error
>
> #mono DbMetal.exe -u="root" -p="" -d=test --provider=MySql
> --code=test.cs -server="localhost"
...
> Failed to load provider MySql :
> DbMetal failed:System.ApplicationException: Failed to load provider MySql
...
1. Which version of DbLinq? (0.19? trunk?)
2. How did you build DbLinq? (xbuild? Visual Studio? MonoDevelop?)
3. Did you install DbMetal.exe to some directory? Or are you running
from the 'build' directory?
DbMetal.exe uses DbMetal.exe.config to lookup the appropriate provider
assemblies, so this necessitates that DbMetal.exe.config actually exist
in the same directory as DbMetal.exe, and that the DbMetal.exe.config
file contain a /configuration/providers element.
Furthermore, assuming the element has been found, Type.GetType() will be
used to load
the /configuration/provide...@name=provider]/@dbLinqSchemaLoader
and /configuration/provide...@name=provider]/@databaseConnection types
(which are assembly-qualified type names).
If you built with Visual Studio, you should be able to run from the
'build' directory w/o issue (I have).
If building with 'xbuild', you need to be using trunk r1305 or later
(otherwise there's a post-build step that uses the 'copy' program to
copy e.g. MySql.Data.dll into the build directory, and xbuild doesn't
support DOS commands; r1305 fixed that).
(I have no idea what MonoDevelop does when building DbLinq.)
If running from an "installation" directory, you'll need to ensure that
all these dependent files are copied into your installation directory as
well -- the DbMetal.exe.config file, DbLinq.dll, DbLinq.MySql.dll,
MySql.Data.dll, and possibly others.
- Jon
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en.