views:

125

answers:

2

I am using TFS2008 and within my TFSBuild.proj file I have a target that call xcopy to copy the build to the production website location for automation. However I am receiving the following error when running the build:

Task "Exec" Command:  xcopy "\\test\TFSBuilds\Online System V2 Build to NETPUB_20100430.2\Debug\_PublishedWebsites\IPAMIntranet" "
    C:\\Inetpub\wwwroot\IPAMOnlineSystem\IPAMIntranet\IPAMIntranet
  " /E 

Parse Error 'C:\\Inetpub\wwwroot\IPAMOnlineSystem\IPAMIntranet\IPAMIntranet' is not recognized as an internal or external command, operable program or batch file.

  '" /E ' is not recognized as an internal or external command, operable program or batch file.

The following is my code line for the xcopy:

  <Target Name="AfterDropBuild">
<Exec Command="xcopy &quot;$(DropLocation)\$(BuildNumber)\Debug\_PublishedWebsites\IPAMIntranet&quot; &quot;$(RemoteDeploySitePath)&quot; /E " /> </Target>

I have even tried single quotes around the file locations and actual double quotes insteand of the " symbols.

Why is this happening, can anyone decipher this for me and help me correct this.

A: 

You maybe have a newline in your definition of RemoteDeploySitePath?

For example, if you do this:

<PropertyGroup>
  <RemoteDeploySitePath>
    C:\\Inetpub\wwwroot\IPAMOnlineSystem\IPAMIntranet\IPAMIntranet
  </RemoteDeploySitePath>
</PropertyGroup>

vs this (still inside a PropertyGroup element of course):

<RemoteDeploySitePath>C:\\Inetpub\wwwroot\IPAMOnlineSystem\IPAMIntranet\IPAMIntranet</RemoteDeploySitePath>

The resulting property in the first case will include the newlines.

What does your definition of RemoteDeploySitePath look like?

Ross Johnston
I had the first case you stated, however I took that definition out and placed the destination directly into the command and it is just hanging now.
mattgcon
Could you add some debug <Message... tasks and post back with the commands and arguments?
Ross Johnston
A: 

I have given up on this copy thing. Question closed. Thanks anyway Ross

mattgcon