Because you are in XML, you need to use the quote entity.  Try:

<exec program="cmd.exe" commandline="/c &quot;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv&quot; ${source.code.folder}\mobilens.sln /rebuild Debug" />

HTH,

Bill







From "Jay Williams" <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]

25/04/2006 16:03


To
<nant-users@lists.sourceforge.net>
cc
Subject
[NAnt-users] Directory paths with spaces






Hi,
 
I need to call devenv directly from within my nant script, but the call won’t work since there are spaces in the file path (it’s located in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE). How do I specify for there to be double-quotes within the call? I used to just allow the call to find devenv from the environment path, but now we have VS 2003 and VS 2005 on our build box, so I need to distinguish between the two.
 
I need to do the following:
 
<exec program="cmd.exe" commandline="/c C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv ${source.code.folder}\mobilens.sln /rebuild Debug" />
 
I get an error because nant tries to execute something like “c:\program” which doesn’t work, of course. How do I get double-quotes into the path? I want it to do something like:
 
(command prompt example—this works from a command prompt, so nant needs to output the command with double-quotes around it)
C:\>”C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv” e:\web\mobilens.sln /rebuild Debug
 
Thanks in advance!
Jay
 
.........................................................................................

Jay Williams

Software Engineer
M:Metrics, Inc.

t
   +1 206 447 1860
f
   +1 206 447 1855

www.mmetrics.com

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

mobile market measurement

Because there’s more to the mobile market than just talk.

 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.


*For security and training purposes, telephone calls may be recorded and monitored.

Reply via email to