Delivering solid user friendly software solutions since the dawn of time.

xcopy exit with code 9009 in Visual Studio post-build

Categories: Visual Studio

Yep, you probably did some windows updates. Things got a bit more strict, when you are not running command windows as administrator some executables are no longer found. And this is also for your visual studio post build events.

I just added C:\Windows\System32\ in front of the xcopy command and it solved things. In mean time also check that you didn't at some additional line breaks on accident. But if you like, you can also add the system directory back to your windows path. You can find this at computer - properties - advanced system settings - environment variables - system variables - path. 

So for example:
C:\Windows\System32\xcopy /s /y "$(ProjectDir)bin\ken.MojoPortal.HtmlTools.Web.dll" "$(SolutionDir)Web\bin\"