What is going wrong when Visual Studio tells me “xcopy exited with code 4”

后端 未结 16 2114
北荒
北荒 2020-12-05 01:33

I\'m not very familiar with post-build events, so I\'m a little confused as to what\'s going wrong with my program. When compiling in visual studio 2010, I get the following

16条回答
  •  无人及你
    2020-12-05 02:06

    In my case the issue was due to incorrect build order. One project had an xcopy command on post-build events to copy files from bin folder to another folder. But because of incorrect dependencies new files were getting created in bin folder while xcopy is in progress.

    In VS right click on the project where you have post-build events. Go to Build Dependencies > Project Dependencies and make sure its correct. Verify the project build order(next tab to dependencies) as well.

提交回复
热议问题