[Mono-devel-list] Re: Potential GAC implementation ideas.

Michal Moskal malekith at pld-linux.org
Thu Oct 23 18:18:38 EDT 2003

On Thu, Oct 23, 2003 at 06:04:03PM -0400, Todd Berman wrote:
> > You run gacutil --cache in relevant directories. It traverses them,
> > and puts somewhere in it's database that file.dll with version
> > (it takes this information from DLL meta data, it's much like soname in
> > UNIX) is in /foo/bar/file.dll.1.13. The runtime then asks gac library. It
> > checks its cache and returns proper filename. where's the problem?
> > 
> So, instead of running a gacutil /i after installing an rpm, you now want to
> run a gacutil --cache? Whats the difference?

The difference is that gacutil --cache doesn't need any arguments. It
just makes sure any internal GAC stuff is valid (assuming that what we
want in GAC in in correct locations).

> > > And what about crossplatform.
> > 
> > This is platform neutral (you just need enough filenames :-)
> This is *not* crossplatform, as right now we are building
> Microsoft.Web.Services.1.dll and Microsoft.Web.Services.2.dll and it
> prevents any crossplatform when the libraries are named such.

Is it *so* broken, that name of DLL isn't stored anywhere inside it? Is
it *just* file name ?

> > > When I compile an application on windows using
> > Microsoft.Web.Services.dll
> > > and I tell it to use version instead of version (both of
> > > which are installed, and in the GAC) it lists the assembly in the PE as
> > > 'Microsoft.Web.Services' not as 'Microsoft.Web.Services.$version'.
> > 
> > You seem to unify concepts of file name and library name. These need not
> > be the same -- that's what's GAC is for (think of directories as parts
> > of file names).
> Correct me if I'm wrong (and I might very well be), but doesn't mono and
> .net use syntax like this inside the assembly/exe?:
> .assembly extern System
> {
>   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
>   .ver 1:0:3300:0
> }
> Again, I could be wrong, but currently, doesn't mono find these files by
> tacking a .dll to the end of that and looking it is locations?
> If instead, it goes through and somehow identifies and then opens all
> possible assemblies in your assembly locations and compares whats it looking
> for to the .assembly notation that defines said assembly, I was not aware.

I don't know what mono is doing. I'm sure that GAC *need* to open
assmebly, find the publictoken and version stuff and store information
that this and that version-publictoken is in file this and that. It
does that when running gacutil /i, right?

What I mean by gacutil --cache is something like:

rm -f /usr/lib/gac/internal.blah
for f in /usr/lib/gac/*.dll ; do
  gacutil /i $f

But of course more efficient.

When gacutil need to open DLL anyway, then filename shouldn't be of much
concern for it.

: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h

More information about the Mono-devel-list mailing list