Fix pre-build event for all targets