Saturday, 24 August 2013

Creating a directory in custom command after Monodevelop builds the project in Windows XP

Creating a directory in custom command after Monodevelop builds the
project in Windows XP

I'm developing a project using Monodevelop 4 in Windows XP and I need to
copy some of the .dll library files into some folder after they are built.
These libraries are plugins to a main project and so the main project is
not depended on them and they need to be copied manually.
But as we are using computers nothing needs to be actually done manually,
and I turned to Monodevelop's Custom Commands in project settings. There I
can type in any command I like (supposedly).
So here's what I did; First I added a command to make sure the destination
folder exists:
mkdir "${SolutionDir}\MainProj\bin\${ProjectConfigName}\Plugins"
And then copied the library:
xcopy "${TargetFile}"
"${SolutionDir}\MainProj\bin\${ProjectConfigName}\Plugins" /Y
But the thing is that the first command fails and so the second one never
executes. To see the results of the first command I checked both of
checkboxes named Run on external console and Pause console ouput and
here's its output:
'"mkdir"' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
In IDE's output panel I can read mkdir
"C:\Some\Path\MainProj\bin\Debug\Plugins" which is correct and when I
paste it into a console creates the folder successfully so I have no idea
why Monodevelop is unable to execute it!
Does anyone have any comment on this problem?

No comments:

Post a Comment