[Mono-bugs] [Bug 531595] New: Resgen2 not rewriting backslashes in UNIX filesystems

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Aug 16 18:01:50 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=531595


           Summary: Resgen2 not rewriting backslashes in UNIX filesystems
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: i586
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: djechelon at fastwebnet.it
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

I created an ASP.NET web application using embedded resources in Visual Studio
in Windows in order to deploy it on Mono under openSUSE.
I added an HTML file into some of them. Resources are in
~/App_GlobalResources/xx directory (where xx is "Default" or language code),
and HTML files are in ~/Resources directory

Visual Studio generates the following into the resx file:

<data name="Default_aspx_body" type="System.Resources.ResXFileRef,
System.Windows.Forms">
    <value>..\..\Resources\Default_aspx_body.htm;System.String, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
  </data>

Visual Studio obviously uses backslashes in Windows file system. However,
resgen2 does not find the file until I manually replace backslashes with
forward slashes. After that, it works fine.

So I think that resgen2 should be aware of Windows file system conventions when
run in UNIX environment, by simply trying to rewrite the path when File.Open
fails (or whatever is used to read the file)

Reproducible: Always

Steps to Reproduce:
1. Create a resource file in any directory of web application
2. Add a file that is hosted on a directory different than it
3. Run resgen2 -compile *.resx from resources directory
Actual Results:  
resgen2 -compile *.resx
Error: Invalid ResX input.
Position: Line 123, Column 5.
Inner exception: Could not find file
"/home/djechelon/srv/www/domains/test.com/AspNet/trunk/SpamBusters/App_GlobalResources/Default/..\..\Resources\Default_aspx_body.htm".

Expected Results:  
Compilation to work fine

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