[Mono-list] Mono.Unix inside Mono.Posix?

Bob Portmann bportmann at yahoo.com
Wed Aug 10 18:46:05 EDT 2005


OK, I see now where Monodoc lists the assembly separate from the
namespace.

Thanks

--- Kornél Pál <kornelpal at hotmail.com> wrote:

> The namespace Mono.Unix is in Mono.Posix.dll it is not a bug. It's by
> desing
> and should not be changed to preserve compatibility with older
> versions. And
> I think there is no need for a separate assembly.
> 
> An assembly can contain any namespace. It is usual even for MS .NET
> or
> standard CLI assemblies to contain namespaces that differ from the
> assembly
> name. For example look at mscorlib.dll it conatins Microsoft.Win32
> and
> System namespaces along with subnamespaces.
> 
> Two different assembly can contain the same namespace.
> For example System.Web.AspNetHostingPermission is in System.dll
> altough you
> could think that it is in System.Web.dll.
> 
> .NET Framework SDK specifies tha assembly of the type because it
> would be
> difficult to guess the assembly.
> 
> The fact that the namespace Mono.Unix is in Mono.Posix.dll is not a
> bug.
> 
> If it is documented anywhere (MonoDoc, FAQ, ...) that there is a
> Mono.Unix.dll it is a bug in the documentation but is not a bug in
> the
> assembly.
> 
> Kornél
> 
> ----- Original Message -----
> From: "Bob Portmann" <bportmann at yahoo.com>
> To: <mono-list at lists.ximian.com>
> Sent: Wednesday, August 10, 2005 7:33 PM
> Subject: [Mono-list] Mono.Unix inside Mono.Posix?
> 
> 
> > I've started using the classes in the Mono.Unix and have noticed
> > something strange about them.  One must include the Mono.Posix
> > assembly instead of the expected (by me) Mono.Unix as demonstrated
> by
> > this simple test case:
> >
> > prompt> cat test.cs
> > using System;
> > using Mono.Unix;
> >
> > public class Test
> > {
> >  public static void Main (string[] args)
> >  {
> >    string currentDir = UnixDirectory.GetCurrentDirectory ();
> >    Console.WriteLine ("Current Directory = {0}", currentDir);
> >  }
> > }
> >
> > prompt> mcs -r:Mono.Unix test.cs
> > error CS0006: Cannot find assembly `Mono.Unix'
> > Log:
> > Compilation failed: 1 error(s), 0 warnings
> >
> > prompt> mcs -r:Mono.Posix test.cs
> > prompt> mono test.exe
> > Current Directory = /Users/me/src/Messages
> >
> > This is non-intuitive and took me a bit to figure out (I had to
> > download the source code to find that Mono.Unix is in the
> Mono.Posix
> > directory).  Monodoc shows both of these assemblies to be at the
> same
> > level so I would expect the first method above to work.
> >
> > Is this a bug or am I just being dense?
> >
> > Question 2: Actually, the only method I need (so far) is
> > Mono.Unix.access to find out if a file has read access.  Is there a
> > way to find this out using a method in System.
> >
> 



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


More information about the Mono-list mailing list