i have following post build command:
xcopy "$(solutiondir)*" "d:\vs\win1\*" /exclude:"e:\exclude.txt" /y /e /d
when building these message:
1>------ build started: project: win1, configuration: debug win32 ------ 1> can't read file: "e:\exclude.txt" 1> 1> 0 file(s) copied 1>c:\program files\msbuild\microsoft.cpp\v4.0\microsoft.cppcommon.targets(113,5): error msb3073: command "xcopy "c:\users\administrator\desktop\win1\*" "d:\vs\win1\*" /exclude:"e:\exclude.txt" /y /e /d 1>c:\program files\msbuild\microsoft.cpp\v4.0\microsoft.cppcommon.targets(113,5): error msb3073: :vcend" exited code 4. ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
e:\exclude.txt file content:
.sdf \debug\ \ipch\ \trash\
i don't know why error. vs can't read file: "e:\exclude.txt" check file exist. read other posts on don't see have same problem. know how fix it?
edit:
xcopy copy files, thank @rustyx's answer. still gave error code 1:
1>------ build started: project: win1, configuration: debug win32 ------ 1> tkk.cpp 1> win1.vcxproj -> d:\t\win1\win1.exe 1> c:\users\administrator\desktop\win1\source\tkk.h 1> 1 file(s) copied 1>c:\program files\msbuild\microsoft.cpp\v4.0\microsoft.cppcommon.targets(112,5): error msb3073: command "xcopy "c:\users\administrator\desktop\win1\*" "d:\vs\win1\*" /exclude:e:\exclude.txt /y /e /d 1>c:\program files\msbuild\microsoft.cpp\v4.0\microsoft.cppcommon.targets(112,5): error msb3073: echo f | xcopy "c:\users\administrator\desktop\win1\debug\win1.pch" "d:\vs\win1\debug\win1.pch" /y /e /f /d" exited code 1. ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
when run command in cmd
window, says 0 file copied:
xcopy "c:\users\administrator\desktop\win1\*" "d:\vs\win1\*" /exclude:e:\exclude.txt /y /e /d
and:
echo f | xcopy "c:\users\administrator\desktop\win1\debug\win1.pch" "d:\vs\win1\debug\win1.pch" /y /e /f /d
what error?
you xcopy command invalid. if run in command prompt, you'll see doesn't work:
> xcopy "c:\users\administrator\desktop\win1\*" "d:\vs\win1\*" /exclude:"e:\exclude.txt" /y /e /d can't read file: "e:\exclude.txt"
try removing quotes after /exclude:
xcopy "$(solutiondir)*" "d:\vs\win1\*" /exclude:e:\exclude.txt /y /e /d
Comments
Post a Comment