[Mono-list] Reference failed...
Tomar
tomar@apricot.com
Tue, 21 Sep 2004 15:27:34 -0500
--=-I/Frt082ZXFwl+A6pqcJ
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Yes, it will. I don't have the ECMA specs in front of me but the
runtime will look in "application base"/"assembly"/"assembly.dll".=20
However in the example posted, the reference was in "lib". The runtime
would have no hint that it should look in "application
base"/lib/"assembly.dll"
On Mon, 2004-09-20 at 14:39, Jonel Rienton wrote:
> hi, shouldn't it at least look for a subdirectory with the same name as=20
> the class?
>=20
> for instance:
>=20
> AppBase: /
>=20
> dog.dll resides in /dog/
>=20
> my code in dog.cs is:
>=20
> /********** dog.cs *************/
> using System;
>=20
> namespace Panther
> {
> public class Dog
> {
> public void Bark()
> {
> Console.WriteLine("woof");
> }
> }
>=20
>=20
>=20
> /*main app*/
> using System;
> namespace Panther
> {
> public class App
> {
> public static void Main()
> {
> Dog dog =3D new Dog();
> dog.Bark();
> }
> }
> }
>=20
>=20
> in ms .net's implementation, the loader looks in:
>=20
> dog.dll
> dog/dog.dll
> dog.exe
> dog/dog.exe
>=20
> On Sep 20, 2004, at 1:16 PM, Tom Larsen wrote:
>=20
> >
> > In general, the way .Net resolves/finds assemblies is dictated by=20
> > .config files in the system. Without trying it, there are two things=20
> > you can do:
> >
> > - place the Alchemi.Core.dll in the gac
> >
> > - move the Alchemi.Core.dll and Demo.exe into the same directory
> >
> > Doing either of these will help Mono locate the assemblies it needs to=20
> > run.
> >
> > Tom Larsen
> >
> > On Mon, 20 Sep 2004, John Sanabria wrote:
> >
> >>
> >> Greetings,
> >>
> >> I'm working with mono and i compiled a simple example, and i got it:
> >>
> >> -=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=
=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-
> >> C:\Trabajo\Alchemi\Research>mcs -r:lib\Alchemi.Core.dll Demo.cs
> >> Compilation succeeded
> >>
> >> C:\Trabajo\Alchemi\Research>mono Demo.exe
> >>
> >> ** (Demo.exe:3248): WARNING **: Could not find assembly Alchemi.Core,
> >> referenc
> >> from C:\Trabajo\Alchemi\Research\Demo.exe (assemblyref_index=3D0)
> >> Major/Minor: 0,8
> >> Build: 0,31549
> >> Token:
> >>
> >> cannot open assembly Demo.exe
> >>
> >> C:\Trabajo\Alchemi\Research>
> >>
> >> -=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=
=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-
> >>
> >> This is a question, just releated with mono:
> >> when i try to run, a simple example, that i had
> >> compiled, of gtk#, i got it:
> >>
> >> -=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=
=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-
> >>
> >> [josanabr@localhost Gtk#]$ mono Hello.exe
> >>
> >> ** (Hello.exe:10051): WARNING **: Could not find assembly gtk-sharp,
> >> references from /home/josanabr/Trabajo/C#/Gtk#/Hello.exe
> >> (assemblyref_index=3D1)
> >> Major/Minor: 1,0
> >> Build: 0,0
> >> Token: 35e10195dab3c99f
> >>
> >> cannot open assembly Hello.exe
> >> [josanabr@localhost Gtk#]$
> >>
> >> -=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=
=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-=3D+=3D-
> >>
> >> I send those problems, in the same mail, because i think that are
> >> releated.
> >>
> >> Any suggestions? Thanks a lot for your attention and help.
> >>
> >> best regards.
> >> _______________________________________________
> >> Mono-list maillist - Mono-list@lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-list
> >>
> > _______________________________________________
> > Mono-list maillist - Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>=20
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
--=20
Tomar <tomar@apricot.com>
--=-I/Frt082ZXFwl+A6pqcJ
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQBBUI62KaYNoZecAvQRApNHAJ4vClX/4WH+/a7SqoWWziRItOaEdACfQ18N
tumShccgipgJjJCzUiPr9eo=
=H2m5
-----END PGP SIGNATURE-----
--=-I/Frt082ZXFwl+A6pqcJ--