Bug 1109 - Custom Build Commands are not running
Summary: Custom Build Commands are not running
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8 beta 3
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-09-28 14:08 UTC by Andrew Young
Modified: 2011-09-28 17:09 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

sample project (11.06 KB, application/zip)
2011-09-28 14:12 UTC, Andrew Young

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andrew Young 2011-09-28 14:08:01 UTC
Custom commands, for example, Before Build, After Build, etc., are not running. Project builds fine but at the end of the Build Output it says in bold red "Custom command executable not exist".
Comment 1 Andrew Young 2011-09-28 14:12:13 UTC
Created attachment 526 [details]
sample project

In this project I set a Custom Command to just echo the Project dir. You can see the error at the end of the build output.
Comment 2 Jeffrey Stedfast 2011-09-28 16:56:17 UTC
Added the path to the error string to see what the problem was:

Custom command executable '/Users/fejj/Downloads/MemTest/MemTest/echo' does not exist

Yea... that kinda explains it. Although it should fall back to not trying to use the PWD as the executable's home dir.

Will see what I can do.
Comment 3 Jeffrey Stedfast 2011-09-28 17:05:21 UTC
fixed in git, will be in 2.8.0 final
Comment 4 Mikayla Hutchinson [MSFT] 2011-09-28 17:05:29 UTC
The MonoDevelop app bundle overrides the $PATH environment variable with a very limited set of values to prevent broken environments from causing problems.

You can work around this by specifying the full path to the custom command executable, e.g. /bin/echo
Comment 5 Andrew Young 2011-09-28 17:06:52 UTC

Side note: If you try it out on MonoDevelop 2.6 it will work. What changed that it would break?

I have a project that is using the sh command to run a shell script which was fine in 2.6 but now in 2.8 it is not running.

"sh ./Build/plist.sh DEV"
Comment 6 Andrew Young 2011-09-28 17:09:10 UTC
Ok. I'll provide the full path from now on just to be safe.