I am using TFS 2008 and within my TFSBuild.proj
file I have a target that calls xcopy
to copy the build to the production location. 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 "$(DropLocation)\$(BuildNumber)\Debug\_PublishedWebsites\IPAMIntranet" "$(RemoteDeploySitePath)" /E " />
开发者_JS百科</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?
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?
精彩评论