[Mono-dev] [Patch] xbuild, ResXFileRef and relative windows paths
skolima at gmail.com
Sun Mar 22 07:24:35 EDT 2009
I agree with Gert, either xbuild has to restrict the path separator
substitution to cases where a file before substitution can not be
found and after substitution it is found, or, IMHO a better solution,
xbuild wrapper script (i.e. the /usr/bin/xbuild itself) should set
MONO_IOMAP before exec'ing mono instead of replicating such hacks
across multiple Microsoft.Build.* classes. Bear in mind that custom
(user-provided) tasks will most likely exhibit this problem as well.
On Sun, Mar 22, 2009 at 8:48 AM, Gert Driesen <gert.driesen at telenet.be> wrote:
> I'm ok with the change, but why not just use MONO_IOMAP?
> Will you only replace the Windows directory separator if the file could not
> be found?
> We should continue to support backslashes in unix paths.
> When we start adding such compatibility hacks in multiple class libraries /
> tools, then it may be a good time to reconsider implementing it in the
> -----Original Message-----
> From: Daniel Nauck [mailto:dna at mono-project.de]
> Sent: zaterdag 21 maart 2009 21:12
> To: mono-devel-list at ximian.com
> Cc: Jain Ankit; Gert Driesen
> Subject: [Patch] xbuild, ResXFileRef and relative windows paths
> i've found 2 problems while i was trying to compile a visual studio project
> with xbuild that contains ResXFileRefs.
> 1.) xbuild doesn't set the BasePath property of
> The first patch fixed this issue. Before that change ResXFileRefs with
> relative paths was ralative to the xbuild working dictionary which was wrong
> in most cases.
> Project dir: /home/mono/Validator
> Resx file in: /home/mono/Validator/Properties/Resources.resx
> with ResXFileRef: <value>..\Resources\dialog.bmp;System.Drawing.Bitmap,[...]
> Bitmap in: /home/mono/Validator/Resources/dialog.bmp
> During compiling resolved to:
> With the patch the result is:
> @Ankit: Please approve and let me know if its ok to commit, thanks.
> 2.) ResXFileRef class is not abel to handle resx files with file refs that
> contains windows paths. This happens when you use for example visual studio
> and add images or other file refs to your resource files.
> It looks like this:
> <data name="dialog" type="System.Resources.ResXFileRef,
> <value>..\Resources\dialog.bmp;System.Drawing.Bitmap, System.Drawing,
> Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
> the resulting file path is:
> So the second patch implements compability to resx files with file refs that
> was generated under windows and replaces the windows path separator with the
> unix path separator (if required).
> xbuild does the same with paths in visual studio projects for compability
> I also talked to Miguel if this compability is ok. He is fine with it.
> @Gert: Please approve and let me know if its ok to commit, thanks.
> Internal Virus Database is out of date.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.11.18/2008 - Release Date: 3/17/2009
> 4:25 PM
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list