[Mono-bugs] [Bug 403601] New: Error in . resx autogenerated class when the resource contains a System.Int32

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 25 04:29:02 EDT 2008


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


           Summary: Error in .resx autogenerated class when the resource
                    contains a System.Int32
           Product: Mono: Tools
           Version: 1.9.0
          Platform: i686
        OS/Version: Debian Woody
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: tools
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jcsegui at cae.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: Third Party Developer/Partner


Created an attachment (id=224209)
 --> (https://bugzilla.novell.com/attachment.cgi?id=224209)
Complete error page with aoutogenerated code

This is the scenario:

I'm working on a web application project. I've a resx file inside
App_GlobalResources directory. One of the properties available in this resx is:

<data name="a" type="System.Int32, mscorlib">
  <value>0</value>
</data>

When I publish the web application and try to access for the first time I get
the following error:
------------------------------------------------------------------------
Compilation Error

Description: Error compiling a resource required to service this request.
Review your source file and modify it to fix this error.

Compiler Error Message:
/tmp/www-data-temp-aspnet-0/32451e4b/App_Web_5fdce0ba_0.cs(60,21) : error
CS0037: Cannot convert null to `int' because it is a value type

Source Error:

Line 58:                 System.Resources.ResourceManager rm =
CAELMS_TL12.ResourceManager;
Line 59:                 if ((rm == null)) {
Line 60:                     return null;
Line 61:                 }
Line 62:                 int obj = ((int)(rm.GetObject("a",
CAELMS_TL12._culture)));


Source File: /tmp/www-data-temp-aspnet-0/32451e4b/App_Web_5fdce0ba_0.cs  Line:
60
------------------------------------------------------------------------

The full error page is attached to let you see the full autogenerated code.

Thank you


-- 
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