Why does xcopy exit with code 9009 in Visual Studi

2019-01-18 01:36发布

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

9条回答
仙女界的扛把子
2楼-- · 2019-01-18 01:50

Mostly related to path C\Program files...\some.exe. It should be "C\Program files...\some.exe"

查看更多
劫难
3楼-- · 2019-01-18 01:53

Found my answer: The command had a line break between the source and destination strings. So, Visual Sudio was treating it as two commands. Eliminating the line break solved the problem.

查看更多
干净又极端
4楼-- · 2019-01-18 01:56

Thanks for your help.

I gave complete path of xCopy and it worked for me.

%windir%\system32\xcopy

%windir%\system32\xCopy "$(ProjectDir)app\ExtjsWS\build\*.*" "$(publishUrl)\app\ExtjsWS\build" /y /i/e</PostBuildEvent>

查看更多
ら.Afraid
5楼-- · 2019-01-18 01:59

This error can occur if your system PATH environment variable has been set incorrectly. The path should contain (at the very least)

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;

on modern versions of Windows (see https://superuser.com/questions/124239/what-is-the-default-path-environment-variable-setting-on-fresh-install-of-window). I have just found my system PATH had been set to

C:\Program Files (x86)\Bad Vendor\Buggy Program;

by an msi installer that obviously has issues.

If you don't know how to edit the PATH via the System Properties dialog, check out this link : http://support.microsoft.com/kb/310519 - it's basically the same in Windows 7 & 8 as it is in XP.

Finally, it's worth noting that a lot of programs don't notice if you update the PATH while they are running, so closing down and re-opeing programs like Visual Studio or command prompt windows will be required for the repaired path to take effect.

查看更多
神经病院院长
6楼-- · 2019-01-18 02:07

Your xcopy command failed for some reason.

I would guess that either the DLL file doesn't exist (eg, the build failed) or the target path doesn't exist.

Run the same command line in a command prompt and see what error it prints.

查看更多
虎瘦雄心在
7楼-- · 2019-01-18 02:07

Even though its a old post, I found fix which may help some one.

What not helped me

Restarting visual studio.
Restarting computer
tried few steps as above and few more blogs

I am using Visual Studio 2013.

What helped me.

Check the Environmental Variables check the PATH, does it has all or nothing or only a part.

since I was having backup of System PATH, I just copy-pasted the variables Under

System Variables -> Path.

At last, I gave rebuild to the project voila! it worked for me.

查看更多
登录 后发表回答