Wondering why your post-build xcopy not working?
From
Microsoft Connect
Thanks for reporting this bug. Unfortunately, after much investigation, we (MSBuild team) discovered that this is actually a documented bug in xcopy.exe. The owners of xcopy.exe claim that this bug is not worth fixing, and so there's not much we can do at this point.
However, the good news is that there is a fairly simple (though completely non-intuitive and non-discoverable workaround), and that is to append "<NUL:" to the end of your xcopy command. So, in your case, just do this:
xcopy "$(TargetDir)*.*" "$(SolutionDir)..\bin\" /S /I /F <NUL:
and that should work for you.
If you want additional information about the bug, you can start by referring to the KB article at: http://support.microsoft.com/default.aspx?scid=kb;en-us;152134. Even though this article talks about calling xcopy from SQL server, it is really the same xcopy bug that is afflicting you in your Post-Build event.
Again, thanks for taking the time to report this, and sorry we're unable to fix this.
--MSBuild team (msbuild@microsoft.com)
These tasks are usually meant to overwrite files so I add '/Y':
xcopy "$(TargetDir)*.*" "$(SolutionDir)..\bin\" /S /I /F /Y <nul:
Technorati tags:
Visual Studio,
CodeProject-Tip