[Mono-devel-list] System.Reflection.AssemblyName issues

Gert Driesen gert.driesen at pandora.be
Wed Jun 9 02:42:37 EDT 2004


Hi,

I've noticed that there are some issue with the Mono implementation of
System.Reflection.AssemblyName, apparently the Mono AssemblyName.FullName
(and ToString()) always output the Culture=... and PublicKeyToken=... parts
of the assembly name, regardless of whether a culture of public key has been
set.

This code fragment :

    AssemblyName a = new AssemblyName ();
    a.Name = "TestAssemblyA";
    a.Version = new Version(1, 5);
    Console.WriteLine ("A: " + a.FullName);

would result in the following output on MS.NET :

    A: TestAssemblyA, Version=1.5

While on Mono you'd get :

    A: TestAssemblyA, Version=1.5, Culture=neutral, PublicKeyToken=null

I also noticed that there's an issue with Assembly.GetName():

For this code fragment (executed in a non signed, culture neutral assembly
called Test) :

    Console.WriteLine (Assembly.GetExecutingAssembly ().GetName
(false).FullName);

I get the following output on MS.NET :

    test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

While on Mono I get :

    test, Version=0.0.0.0, Culture=neutral

Another thing I noticed while looking at the code of AssemblyName, is that
the serialization stuff is very much incomplete.

I attached a small test case (not including the serialization issue).

Haven't had time to look into this much further (duty calls) and can't seem
to access the Mono website right now, so I can't file a bug report for this
yet.

Gert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040609/606c70c3/attachment.pl 


More information about the Mono-devel-list mailing list