[Mono-devel-list] Assembly resolution for monop
john.luke at gmail.com
Wed Nov 10 14:56:17 EST 2004
On Wed, 10 Nov 2004 13:02:39 -0500 (EST), Ben Maurer <bmaurer at ximian.com> wrote:
> >> I am wondering if I can get advice for:
> >> * What I need to do to make it easier for users to browse gtk#
> >> assemblies especially, but also other assemblies that use all
> >> of the versioning features we have provided
> >> * How to cope with || installs?
> >> * Any other things that I need to add to monop to cope with the
> >> GAC.
> > You can specify either the full path to an assembly, or the full
> > AssemblyName to load a specific version (at least it should work with
> > monop). I agree it would be nice to make it easier. Perhaps by
> > default you get the latest possible version visible to monop, and
> > there is a version option where you restrict it by 1.X or 1.2.X etc.
> > Although, the reflection API doesn't seem to provide an easy way to do
> > this if I remember correctly.
> > monop -r:gtk-sharp (gives you latest in GAC)
> > monop -r:gtk-sharp -version:1 (gives you latext 1.x)
> > monop -r:gtk-sharp -version:1.0 (gives you latext 1.0.x)
> How exactly do you tell mcs which version to use? IMHO, monop should have
> the same syntax for references as mcs. Or is there another more logical
> way to do it for monop.
Well mcs works file based (or in the same directory as the .exe) like
monop except it also knows about pkg-config via the -pkg switch. I
don't think monop needs to be as strict though, so my suggesting it
could do some work to find assemblies via the gac for you that mcs or
other compilers wont do. As Duncan pointed out this is not directly
available through the current Reflection API though, you would
probably need to use what the gacutil or runtime uses.
> > I'll add that the 1.1 compiled monop cant browse the 2.0 assemblies (or
> > anything compiled with gmcs) perhaps it should be compiled to do so.
> Adding support for generics is something i want to do in the future. Once
> we start using List <T> we will still have the count/length confusion :-).
> Gettting this support right is going to take a bit of effort though.
> If anyone wants to start working on this, I'd be delighted. It is a great
> way to learn the new 2.0 apis.
> -- Ben
Provided you compile monop with gmcs it already works with generics as
far as I can tell (except that the `1 notation causes you to have to
escape it from the shell).
More information about the Mono-devel-list