Yes, Mono ships with sqlmetal.bat, which calls mono.exe with the full
paths. I thought I had mentioned that, but I don't see it in the
thread. My last post was intended to demonstrate that the correct
sqlmetal was called by the batch script, so address your point about
precedence of .exe/.bat and which sqlmetal was being called:

C:\...> mono "C:\PROGRA~1\MONO-2~1.7\lib\mono\2.0\sqlmetal.exe" --
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.

Sandro

On Sep 4, 5:23 pm, Jonathan Pryor <[email protected]> wrote:
> On Thu, 2010-09-02 at 17:59 -0700, Sandro wrote:
> > 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:
>
> %PATH% is irrelevant.  All that matters is which runtime is used to load
> sqlmetal.exe, and if 'sqlmetal.exe' is in your path, then .NET will be
> used to execute it when you just use 'sqlmetal' and/or 'sqlmetal.exe'.
> (IIRC, .bat in the path won't help, as the .exe has precedence over
> the .bat unless you run 'sqlmetal.bat', and I don't know if a .bat
> or .cmd is present anyway...)
>
> Thus, you'd either need to completely uninstall .NET (;-) or make sure
> you use mono by running 'mono path\to\mono\sqlmetal.exe'.
>
> Or perhaps running 'sqlmetal.cmd' (assuming it exists...).
>
> Alternatively, download the DbLinq binary package and use DbMetal.exe.
> You can run DbMetal-generated output under Mono by compiling with the
> MONO_STRICT #define.
>
>  - 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