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

Gert Driesen gert.driesen at pandora.be
Wed Jun 9 02:50:34 EDT 2004


correction inline ...

----- Original Message -----
From: "Gert Driesen" <gert.driesen at pandora.be>
To: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, June 09, 2004 8:42 AM
Subject: [Mono-devel-list] System.Reflection.AssemblyName issues


> 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

This last result is bogus as I got this after trying to fix the two issues
list above. On Mono you get the same result as on MS.NET, but only because
of the fact that AssemblyName.FullName always output the culture and
publickeytoken parts ....

Gert




More information about the Mono-devel-list mailing list