[Mono-devel-list] Global dllmap entries?

Paolo Molaro lupus at ximian.com
Mon Apr 11 12:57:33 EDT 2005


On 04/11/05 Dan Winship wrote:
> Can't we just say that if you pull in gtk-sharp.dll from the GAC, that
> you automatically pull in gtk-sharp.dll.config from the GAC too? (And

Well, this issue is not related to the GAC in any way.
One possibility is to make the code look for the dllmaps in any
of the referenced assemblies automatically so there would be no
need even for the reference dllmap. But I don't like this, because
it is out of the control of the app and the user (in mostly the same way
as the global-dllmap proposed by miguel).

> can't we just store the .config file as a resource inside gtk-sharp.dll
> rather than as a separate file? Or would that be at the wrong level of
> abstraction for the vm to be able to find it?)

If you store the config in the assembly you might as well build a correct
assembly in the first place.
I designed the dllmap in that way because it allows users to change the
configuration (because it's a lost cause to have every developer understand
the issues of library names and different operating systems etc), so
hardcoding the config inside the assembly doesn't make much sense
(even if we can access it there).

My proposal addresses the stated need to reuse the mappings from
assemblies like gtk-sharp with the only cost of adding a simple
config file (which is arch-indep) to the asemblies that need it.
A global dllmap may seem a simpler solution, but introduces
changes in all the apps in ways that may not be predictable.
I'll also note that my solution can work even when the referenced
assembly is not loaded, which might be useful.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list