[Mono-list] Reference failed...

Jonel Rienton jonel@jonelrienton.net
Mon, 20 Sep 2004 14:39:38 -0500


hi, shouldn't it at least look for a subdirectory with the same name as 
the class?

for instance:

AppBase: /

dog.dll resides in /dog/

my code in dog.cs is:

/********** dog.cs *************/
using System;

namespace Panther
{
public class Dog
{
   public void Bark()
   {
     Console.WriteLine("woof");
   }
}



/*main app*/
using System;
namespace Panther
{
public class App
{
  public static void Main()
  {
     Dog dog = new Dog();
     dog.Bark();
}
}
}


in ms .net's implementation, the loader looks in:

dog.dll
dog/dog.dll
dog.exe
dog/dog.exe

On Sep 20, 2004, at 1:16 PM, Tom Larsen wrote:

>
> In general, the way .Net resolves/finds assemblies is dictated by 
> .config files in the system.   Without trying it, there are two things 
> 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 
> 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:
>>
>> -=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
>> 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=0)
>>     Major/Minor: 0,8
>>     Build:       0,31549
>>     Token:
>>
>> cannot open assembly Demo.exe
>>
>> C:\Trabajo\Alchemi\Research>
>>
>> -=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
>>
>> 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:
>>
>> -=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
>>
>> [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=1)
>>     Major/Minor: 1,0
>>     Build:       0,0
>>     Token:       35e10195dab3c99f
>>
>> cannot open assembly Hello.exe
>> [josanabr@localhost Gtk#]$
>>
>> -=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-
>>
>> 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
>