[Mono-bugs] [Bug 381204] New: versioninfo: wrong language returned for invariant language (0x7f)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 18 04:22:28 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=381204


           Summary: versioninfo: wrong language returned for invariant
                    language (0x7f)
           Product: Mono: Runtime
           Version: SVN
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: io-layer
        AssignedTo: dick at novell.com
        ReportedBy: gert.driesen at pandora.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


When the language of the version info is set to 0x7f, then
FileVersionInfo.Language returns the wrong language on Windows. All tests pass
just fine on Linux.

To reproduce:

1. compile the following code:

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;

class Program
{
  static int Main (string [] args)
  {
    if (args.Length == 0) {
      Console.WriteLine ("Please specify action.");
      return 1;
    }

    switch (args [0]) {
    case "create":
      AssemblyName aname = new AssemblyName ();
      aname.Name = "lib1";

      AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly (
        aname, AssemblyBuilderAccess.RunAndSave,
        AppDomain.CurrentDomain.BaseDirectory);
      ab.DefineVersionInfoResource ("BBB", "2.3", "CCC", "DDD", "EEE");
      ab.Save ("lib1.dll");
      break;
    case "verify":
      string assemblyFile = Path.Combine
(AppDomain.CurrentDomain.BaseDirectory,
        "lib1.dll");
      FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (assemblyFile);
      Console.WriteLine (fvi.Language);
      break;
    default:
      Console.WriteLine ("Unknown action {0}.", args [0]);
      return 1;
    }

    return 0;
  }
}

2. run 'mono test.exe create'.
3. run 'mono test.exe verify'.

Expected result:

Invariant Language (Invariant Country)

Actual result:

Language Neutral

Note:

The versioninfo is created just fine: if you create the assembly using Mono
(either Windows or Linux), then the result of "verify" is correct on .NET (1.1
/ 2.0) and Mono/Linux, but not on Mono/Windows.

If you create the assembly using .NET, you get the same result: "verify" is
correct on .NET (1.1 / 2.0) and Mono/Linux, but not on Mono/Windows.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list