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

后端 未结 16 2080
北荒
北荒 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:02

    As other answers explain, exit code 4 may have many causes.

    I noticed a case, where resulting path names exceeded the maximum allowed length (just like here).

    I have replaced xcopy by robocopy for the affected post build event; robocopy seems to handle paths slightly different and was able to complete the copy task that xcopy was unable to handle.

提交回复
热议问题