For mostly unrelated reasons (due to a bad configuration), I found
myself digging through
src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs,
specifically 
SchemaLoaderFactory.CurrentDomain_AssemblyResolve(), and found myself
wondering...what's going on?

Specifically, it appears to contain code which will probe the current
working directory for assemblies that couldn't be found.  Thus, the
questions:

1. Is this really necessary?

2. The current working directory?  Seriously?  Keep in mind that
DbMetal.exe is a command-line app; thus, with the current logic it'll
probe whatever directory you happen to be in when running the app.  This
seems decidedly counter-intuitive, as merely changing your directory
will either fix or cause problems.

It would seem more rational to probe DbMetal.exe's directory...but
that's what Type.GetType() already does.

3. It assumes where the GAC is -- %SystemRoot%\Assembly\GAC, etc.  Aside
from the obvious that this won't work on Mono, this relies on an
implementation detail of .NET which could change at any time.

For the Mono case, the "workaround" is to just never hit that code path
in the first place (i.e. provide a correct fully qualified type name),
so this isn't a major problem.  It's just a "wtf?!" moment, something
I'd prefer to have fewer of...

Thanks,
 - 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