Command copy exited with code 4 when building - Visual Studio restart solves it

前端 未结 27 2397
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 08:51

Every now and then when I build my solution here (with 7 projects in it) I get the dreaded \'Command copy exited with code 4\' error, in Visual Studio 2010 Premium ed.

27条回答
  •  囚心锁ツ
    2020-12-04 09:26

    I don't see anything in here to suggest that this is a web-app but I have experienced this issue myself - I've got two xcopy commands on a post-build event and only one of them was failing. Something had a lock on the file, and it wasn't Visual Studio (as I tried restarting it.)

    The only other thing that would have used the dll I built was IIS. And lo and behold,

    A simple iisreset did the trick for me.

提交回复
热议问题