Best way to make a project with post-build script work on MonoDevelop and Visual Studio?
.net, cross-platform, linux, monodevelop, visual-studio
Solution
Where possible, if you can lean on built-in MSBuild tasks rather than custom shell scripting, the behavior will generally work on xbuild (and hence MonoDevelop?) without any changes, so no need for platform-specific *proj hacks.
eg:
<Target Name="AfterBuild">
<Copy SourceFiles="foo.txt" DestinationFolder="$(OutDir)" />
</Target>
This is from the mono docs: http://www.mono-project.com/archived/porting_msbuild_projects_to_xbuild/#prepostbuildevents
Problem
I have an open source project in which I'm trying to allow development on both MonoDevelop(including *nix) and Visual Studio. One of my recently discovered requirements is I need to copy an outputted file from one directory to another(relative path). Windows however has the `copy` command, while *nix has the `cp` command. What is the best way to get this to work on both platforms and resolve this difference of commands?