0

Okay, I am going nuts here. I have searched and tried every command I can find to try to copy the result of my build to another directory on the network. So basically I want to build the project, then have the created .DLL copied and overwrite the one on the network. Here is my latest try that I found online:

xcopy /i /e /s /y /f $(TargetPath) "\\SERVER\Folder1\Folder2\Binaries"

This just does not seem to work! Can somebody give me an example of how I can write this line that will work?

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
Tom Minton
  • 33
  • 1
  • 7
  • Put "double quotes" around $(TargetPath) so it still works when the project directory name contains spaces. – Hans Passant Aug 04 '17 at 23:11
  • When I put double quotes around $(TargetPath) it doesn't seem to see the directory, and shows empty quotes with a "Code 4" error: The command "xcopy /i /e /s /y /f "" "\\SERVER\Folder1\Folder2\Binaries"" exited with code 4. – Tom Minton Aug 07 '17 at 13:49
  • Possible duplicate of [$(ProjectName) and $(TargetName) MSBuild macros not working](https://stackoverflow.com/questions/33126926/projectname-and-targetname-msbuild-macros-not-working) – Florian Winter Sep 05 '17 at 10:09

0 Answers0