[Mono-bugs] [Bug 336283] New: ResourceManager. CheckBaseName problem with resources named : resources.resx

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 24 08:07:48 EDT 2007


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

           Summary: ResourceManager.CheckBaseName problem with resources
                    named : resources.resx
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: informatique.internet at fiducial.fr
         QAContact: mono-bugs at ximian.com
          Found By: ---


To reproduce the problem;

1. Create a web project with ASP.NET 1.1
2. add a resource (resx) file named resources.resx in a directory called Res
3. in the page load call : ResourceManager rm=new
ResourceManager("TestResources.Res.resources",Assembly.GetExecutingAssembly());

.. Execute the app and you'll get :

Unhandled Exception: System.ArgumentException: ResourceManager base name should
not end in .resources. It should be similar to MyResources, which the
ResourceManager can convert into MyResources.<culture>.resources; for example,
MyResources.en-US.resources
  at System.Resources.ResourceManager.CheckBaseName (System.String baseName)
[0x0002c] in
/home/hubert/mono/mcs/class/corlib/System.Resources/ResourceManager.cs:463 
  at System.Resources.ResourceManager..ctor (System.String baseName,
System.Reflection.Assembly assembly) [0x00006] in
/home/hubert/mono/mcs/class/corlib/System.Resources/ResourceManager.cs:92 

On MS.NET it works well,

on ms.Net the CheckBaseName function is more clever... it checks if the
resource : 
TestResources.Res.resources.resources exist before crashing...

On Mono (from svn) it fails

The CheckBaseName function has been checked in by gert :

http://anonsvn.mono-project.com/viewcvs/trunk/mcs/class/corlib/System.Resources/ResourceManager.cs?rev=85866&r1=78024&r2=85866


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


More information about the mono-bugs mailing list