I start a Mono command prompt, which adds the mono bin folder to %PATH
%. .NET 3.5 and its tools are not in the default path. I then type:

C:\...> sqlmetal -?

DbLinq Database mapping generator 2008 version 0.20
for Microsoft (R) .NET Framework version 3.5
Distributed under the MIT licence (http://linq.to/db/license)

sqlmetal [OPTIONS] [<DBML INPUT FILE>]

  Generates code and mapping for DbLinq. SqlMetal can:
  - Generate source code and mapping attributes or a mapping file from
a database.
  - Generate an intermediate dbml file for customization from the
database.
  - Generate code and mapping attributes or mapping file from a dbml
file.
[...]

C:\...> sqlmetal --server=.\SA --database=FOO --namespace=Foo.DB --
code=Foo.DB.cs

DbLinq Database mapping generator 2008 version 0.20
for Microsoft (R) .NET Framework version 3.5
Distributed under the MIT licence (http://linq.to/db/license)

sqlmetal: Could not load dbLinqSchemaLoaderType type
'DbLinq.SqlServer.SqlServerSchemaLoader, System.Data.Linq,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Try using the --with-schema-loader=TYPE option.

I disassembled the System.Data.Linq.dll you provided and I see the
DbLinq.SqlServer classes there, but I guess it can't find them for
some reason. Do I need to rebuild or clear some sort of gac cache or
something?

Sandro

On Aug 25, 2:53 pm, Jonathan Pryor <[email protected]> wrote:
> On Fri, 2010-08-20 at 14:57 -0700, Sandro wrote:
> > Finally got around to trying this again with your updated dlls, but
> > I'm still getting the error. Probably should mention I'm running
> > Windows.
>
> Just as a basic sanity measure, are you sure you're running your app via
> Mono and not .NET?  I don't have the Windows install around to quickly
> test on, but if you just use 'sqlmetal.exe' at the command line you'll
> be using the .NET runtime, which will then attempt to load .NET's
> System.Data.Linq.dll, which will fail to find any DbLinq types (for
> ~obvious reasons).  You'll need to ensure that 'mono sqlmetal.exe' is
> being used when using Mono's sqlmetal.exe.
>
> (I suppose a sqlmetal.bat might be shipped to ensure that mono is being
> used, but iirc .exe files are preferred to .bat files, so 'sqlmetal'
> will load sqlmetal.exe, not sqlmetal.bat...)
>
>  - 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.

Reply via email to