If you're writing some app that you want to distribute, you really need a standalone binary. For Mono, it can be easily generated by mkbundle utility. You really want to automate this stuff. So, what is the easiest way to do it? Make a new step in build scripts.
In xbuild scripts, just as in msbuild, there is an Exec task, which allows you to run an arbitrary application. So, in Mono it would look something like this:
<Target Name='AfterBuild'> <Exec Command="mkbundle bin/$(Configuration)/PowerCertmgr.exe -o power-certmgr" Condition="'$(OS)' == 'Unix'" /> </Target>
We want to run this script only if OS is Unix-like. Why? Well, I'm working in Linux and I don't really care about Windows :) One should check if it runs on non-Unix systems, and in case of problems provide alternative implementations.
Even though xbuild scripts are underdeveloped compared to msbuild scripts, they can easily handle work like that. I really hope this approach will be more popular.