Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does xcopy exit with code 9009 in Visual Studio post-build step?

I am getting the following error, which I don't understand. Any suggestions?

Error 1 The command "xcopy "D:\Users\johndoe\Documents\Visual Studio 2008\Projects\MyProject\MyProject.Modules.Ribbon\bin\Debug\MyProject.Modules.Ribbon.dll" "D:\Users\johndoe\Documents\Visual Studio 2008\Projects\MyProject\MyProject\bin\Debug\Modules\" /Y" exited with code 9009. MyProject.Modules.Ribbon

like image 453
David Veeneman Avatar asked Jan 01 '10 14:01

David Veeneman


People also ask

How do I fix error code 9009?

Download Outbyte PC Repair application See more information about Outbyte; uninstall instructions; EULA; Privacy Policy. Click the Scan Now button to detect issues and abnormalities. Click the Repair All button to fix the issues.

Is not recognized as an internal or external command operable program or batch file program exited with code 9009?

Error Code 9009 means error file not found. All the underlying reasons posted in the answers here are good inspiration to figure out why, but the error itself simply means a bad path. It happens when you are missing some environment settings for using Microsoft Visual Studio x86 tools.


2 Answers

I encounted this error on the TeamCity build server. I finally resolved it after checking the build log and found:

"'xcopy' is not recognized as an internal or external command."

I then changed my statement to:

C:\Windows\System32\xcopy "$(ProjectDir)config\Web.config.$(ConfigurationName)" "$(ProjectDir)Web.config" /Y/R

like image 64
Jobrocol Avatar answered Sep 22 '22 00:09

Jobrocol


Restart Visual Studio. Worked for me

like image 31
user3875275 Avatar answered Sep 24 '22 00:09

user3875275