[MonoDevelop] Custom command path with space

Steve Lessard s_lessard at yahoo.com
Wed Jan 26 05:47:20 EST 2011


In this case it may help to think in a Unix context.  Have you tried
backslash escaping the spaces?

c:\\program\ files\\prog.exe

another option to aid in debugging this issue is to change the command in a
way that might help you gain insight into how the file name is being
conveyed to the shell.  Example:

echo c:\\program\ files\\prog.exe

Another trick I have used often is to create a shell script to display the
command passed to the shell as well as the command's arguments.  In the
working directory create a script called ShowCommand.cmd with something
similar to the following:

echo on
echo raw command: %0 %*
echo arg0: {%0}
echo arg1: {%1}
echo arg2: {%2}
echo arg3: {%3}
echo arg4: {%4}
echo arg5: {%5}
echo arg6: {%6}
echo arg7: {%7}
echo arg8: {%8}
echo arg9: {%9}
 
The curly braces around each positional parameter help to identify any
leading or trailing whitespace in the value.  

Then change your custom build command to this:

ShowCommand.cmd c:\\program\ files\\prog.exe foo bar "foo bar"


-- 
View this message in context: http://mono.1490590.n4.nabble.com/Custom-command-path-with-space-tp3235828p3237805.html
Sent from the Mono - MonoDevelop IDE mailing list archive at Nabble.com.


More information about the Monodevelop-list mailing list