-1

I'm new to this TFS BUILD, currently i'm having the vendor application without the source code i have only the published files like (Bin, image, aspx files and DLL) for the published files i need to copy all the files what vendor has given to me and paste into target location.

Below is the configuration i done in TFS build definition.
1. Source setting tab
    a) Source Control folder - Project Location
    b) build agent folder - $(SourceDir)
2. Build defaults
    a) Build controller - as defined my client.
    b) staging location - my dev server path(\\devserver\foldername)
3. Process tab
    a) Process parameter
        i) required 
           - Items to build
               * project to build - what should i give here whether the solution         file or bat file manually created by me.
        2) post build script - i mapped my bat file.

Bat file commands.

 cd /d %2
 md "VEMS_PROD_Sample"
 cd webdeploy
 xcopy *.* %2\VEMS_PROD_26082016_V1 /E

if i ran the build with above setting files are not copied below is the log i got

2016-08-26 10:27:59,796 INFO 

C:\Windows\system32>cd /d "D:\8228\Binaries" 

D:\8228\Binaries>md "VEMS_PROD_Sample" 

D:\8228\Binaries>cd webdeploy 

D:\8228\Binaries>xcopy *.* "D:\8228\Binaries"\VEMS_PROD_26082016_V1 /E 
0 File(s) copied
 ==================================================
 2016-08-26 10:27:59,834 ERROR 
 The system cannot find the path specified.
Cannot perform a cyclic copy
Raj
  • 487
  • 3
  • 11
  • 24

1 Answers1

0

The error you get appear usually when recursive source and target locations overlap.

According to the log info,the command cd webdeploy failed, it's still under D:\8228\Binaries> when you are running the xcopy command. Please double check if there is a webdeploy folder on the agent or if you have enough permission to enter the folder.

Moreover, suggest you to add a /y during the xcopy command such as below:

xcopy /E /Y "$(ProjectDir)Views" "$(SolutionDir)MEFMVCPOC\Views"

/Y - Do not prompt for overwrite of existing files. 

More details about the xcopy command in post build, please refer this :

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62