[Mono-list] xbuild: Including backslashes that shouldn't get converted to forward slashes

Matt Zinkevicius matt.zinkevicius at hp.com
Thu Jun 18 19:19:54 UTC 2015


Sadly, after looking at the Mono codebase more, It looks that there is no way to support passing backslashes through without conversion. I'm surprised as it's not that uncommon of a need.

I've opened a defect:
https://bugzilla.xamarin.com/show_bug.cgi?id=31174

Related defect: 
https://bugzilla.xamarin.com/show_bug.cgi?id=6759

--Z

From: Zinkevicius, Matt 
Sent: Monday, June 15, 2015 1:03 PM
To: 'knocte [via Mono]'
Subject: RE: xbuild: Including backslashes that shouldn't get converted to forward slashes

You definitely want xbuild to convert them as paths in the majority of cases, but you need a way to override that behavior for exceptional circumstances. This done in most languages through escaping of some sort, I'm just not sure how to express that here.

--Z

From: knocte [via Mono] [mailto:ml-node+s1490590n4666199h66 at n4.nabble.com] 
Sent: Monday, June 15, 2015 12:36 PM
To: Zinkevicius, Matt
Subject: Re: xbuild: Including backslashes that shouldn't get converted to forward slashes

On 15/06/15 20:42, Andres G. Aragoneses wrote: 

> On 15/06/15 19:34, Matt Zinkevicius wrote: 
>> I have an msbuild/xbuild file which uses the Exec task to invoke a 
>> command 
>> line tool. The tool takes a regular expression as a parameter, which 
>> in my 
>> case contains a backslash (\) character. It seems that xbuild converts 
>> all 
>> backslashes into forward slashes, as they usually represent a directory 
>> separation character, but in this specific case I need it passed without 
>> conversion. I have tried escaping (\\) and encoding (\) but neither 
>> worked. 
>> 
>> How can this be achieved? 
> 
> It's probably an xbuild bug, as it should only try to convert the first 
> element, not the arguments. 

I take that back, since the arguments can contain file paths too. I 
guess this is a hard problem to solve. Maybe the \ -> / conversion 
should only live in the IO layer, not in the xbuild layer. 


_______________________________________________ 
Mono-list maillist  -  [hidden email] 
http://lists.ximian.com/mailman/listinfo/mono-list
________________________________________
If you reply to this email, your message will be added to the discussion below:
http://mono.1490590.n4.nabble.com/xbuild-Including-backslashes-that-shouldn-t-get-converted-to-forward-slashes-tp4666197p4666199.html 
To unsubscribe from xbuild: Including backslashes that shouldn't get converted to forward slashes, click here.
NAML 




--
View this message in context: http://mono.1490590.n4.nabble.com/xbuild-Including-backslashes-that-shouldn-t-get-converted-to-forward-slashes-tp4666197p4666224.html
Sent from the Mono - General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20150618/0ecf62cf/attachment.html>


More information about the Mono-list mailing list