User441461330 posted
Solved it.
I had the InitialTargets property in the <Project InitialTargets="CustomCleanup" ... >
set to a custom target that cleaned out the WDP output folder before the build was started.
Well it seems that this gets called again when the next project is building (i.e. the Setup project).
The solution was to move the code from the CustomCleanup target into the BeforeBuild target. So now
the custom clean up code is only called before the WDP build.