[Mono-bugs] [Bug 514192] New: When a resource contains an special character like [ the generated code won't compile

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 17 18:27:56 EDT 2009


           Summary: When a resource contains an special character like [
                    the generated code won't compile
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: All
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: xlomas at kruger.com.ec
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:
Gecko/2009060200 SUSE/3.0.11-0.1.1 Firefox/3.0.11

Wen you have a resource file, and in the name of the one of the resources name
contains a character like the [], the generated code to compile the resources
contains compilation errors, the get property generates with the [] and causes
the program to fail.

Resources.resx -> Resource Name: dgrData_Column[0].Text, Resource Value: Paste
Generated Code -> ...... public dgrData_Column[0].Text { get .....

The [] causes that the compiler stop because in C# Properties names you can't
use these special characters....

Reproducible: Always

Steps to Reproduce:
1.Create a Resource file in an ASP .NET application
2.Create a Resource inside the file with the [] characters in the name, like a
indexer in C#
3.Set the resource value
4.Copy the application to a new site
5.Try to access any page
Actual Results:  
Compiler stops and the ASP .NET Site doesn't work!

Expected Results:  
The site goes up!

In .NET it works like a charm!

Configure bugmail: http://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