Post-build event command line error
-
I am using the following command in the post-build event for copying the dll from the target dir to the destination copy $(TargetDir)\*.exe $(SolutionDir)\Bin\$(ConfigurationName) copy $(TargetDir)\*.exe.config $(SolutionDir)\Bin\$(ConfigurationName) when i try to compile the project i am getting the following error "Error 5 The command "copy D:\src_comp\C1\bin\Debug\\*.exe D:\src_comp\\Bin\Debug copy D:\src_comp\C2\bin\Debug\\*.exe.config D:\src_comp\\Bin\Debug" exited with code 1. CDC" Can any one tell me what is going wrong here?
-
I am using the following command in the post-build event for copying the dll from the target dir to the destination copy $(TargetDir)\*.exe $(SolutionDir)\Bin\$(ConfigurationName) copy $(TargetDir)\*.exe.config $(SolutionDir)\Bin\$(ConfigurationName) when i try to compile the project i am getting the following error "Error 5 The command "copy D:\src_comp\C1\bin\Debug\\*.exe D:\src_comp\\Bin\Debug copy D:\src_comp\C2\bin\Debug\\*.exe.config D:\src_comp\\Bin\Debug" exited with code 1. CDC" Can any one tell me what is going wrong here?
might be the double slash causing a problem try changing it to copy $(TargetDir)*.exe ...
Help me! I'm turning into a grapefruit! Buzzwords!
-
might be the double slash causing a problem try changing it to copy $(TargetDir)*.exe ...
Help me! I'm turning into a grapefruit! Buzzwords!
$(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.
-
$(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.
I've just checked one of my projects - $(TargetDir) is "c:\projects\project1\" so the trailing backslash is included. You're trying to resolve the address something like "c:\projects\project1\\*.exe" which isn't valid path. Make the change the OP stated - it should work.
It definitely isn't definatley
-
$(TargetDir) is the directory of the primary output file for the build (defined with drive and path). It should includes the trailing backslash '\'.
there's a double slash in the error you reported:
Reddy Prakash wrote:
"Error 5 The command "copy D:\src_comp\C1\bin\Debug**\\***.exe D:\src_comp\\Bin\Debug
Help me! I'm turning into a grapefruit! Buzzwords!