Please see my edit. this is how you do prebuild event. my first part of the post (before EDIT) is not needed of course.