Maybe OutDir instead of TargetDir fixes the problem...