Optimize in BeforeBuild target