Fired up Windows, and I now know the problem.

Windows' lack of symbolic links sucks. :-)

Specifically, on Unix, there are two sets of assemblies:

        $prefix/lib/mono/gac/System.Data.Linq/VERSION/System.Data.Linq.dll
        $prefix/lib/mono/2.0/System.Data.Linq.dll

The latter is a symlink to the former. [0]

Since Windows doesn't (normally) have symbolic links, thus those are two
separate files.

Worse, sqlmetal.exe is in...$prefix/lib/mono/2.0, and thus by the normal
assembly resolution rules, it loads the *copy* in $prefix/lib/mono/2.0
rather than using the GAC version.

Thus, the fix is simple: Copy

        http://www.jprl.com/tmp/System.Data.Linq.dll

to

        C:\PROGRA~1\MONO-2~1.7\lib\mono\2.0\

Things should work for you then.  (At least, I no longer get the "Could
not load dbLinqSchemaLoaderType..." message anymore.)

 - Jon

[0] This is actually not much different from .NET, where the GAC has one
copy of the assembly, and %WINDIR%\Microsoft.NET\Framework\... has
another copy.  Then C:\Program Files*\...\Reference Assemblies\ has yet
another.  There may be a fourth copy somewhere else.

Remember: the C# compiler does NOT look for assemblies in the GAC.

On Wed, 2010-09-29 at 14:38 -0700, Sandro wrote:
> In my first reply to your suggestion I provided the path I used [1],
> so I figure you would have mentioned then whether that was incorrect.
> I also mentioned [2] that I disassembled the new dlls you provided and
> the class was there, but the error still occurs, so something else is
> wrong.
> 
> I asked whether there was some sort of cache I needed to generate, but
> you didn't mention anything in response to that question, so I presume
> not. I don't know what else it could be.
> 
> Sorry I'm sometimes a little delayed in my replies, I only have time
> to work on this in fits and spurts, so you've probably forgotten that
> I started this whole thread; I figured you might be thinking I'm
> someone new with the same problem. :-)
> 
> Sandro
> 
> [1] http://groups.google.com/group/dblinq/msg/0fcf5ec77f4a6c0e
> [2] http://groups.google.com/group/dblinq/msg/fd8b7afee414abb9
> 
> 
> On Sep 29, 11:24 am, Jonathan Pryor <[email protected]> wrote:
> > On Wed, 2010-09-29 at 07:33 -0700, Sandro wrote:
> > > That's just a link back to this thread. My post was a follow-up to the
> > > suggestions you already gave me, and I already have those updated
> > > dlls.
> >
> > I didn't know you were trying the updated DLLs.  I somehow missed that.
> >
> > Are you sure you're replacing the System.Data.Linq.dll assembly that's
> > in Mono's GAC?  That should work, as
> >
> >         monodis --typedef System.Data.Linq.dll
> >
> > shows that the type DbLinq.SqlServer.SqlServerSchemaLoader is present
> > within that assembly (unlike the 2.6.7 System.Data.Linq.dll), so it
> > should work.  If it doesn't, either it's some other error, or you're not
> > replacing the assembly within Mono's GAC.
> >
> >  - 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