0
votes

I have a visual studio 2010 project which has a command to copy files. It works fine on my machine but it is causing the build on Team City to fail.

I tried to create the bin folder as advised by this discussion http://devnet.jetbrains.net/message/5226990;jsessionid=DDE1BE4846DE75E5368364742913503E but no joy.

Here is the command:

mkdir "$(SolutionDir)IL.UserAdmin.Web\bin" xcopy /E /D /Q /Y "$(SolutionDir)Library\Oracle Data Access*.dll" "$(TargetDir)"

Here is the error:

c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3717, 9): error MSB3073: The command "mkdir "C:\eBusiness\Dev4.0\UserAdmin\IL.UserAdmin.Web\bin" 2>nul xcopy /E /D /Q /Y "C:\eBusiness\Dev4.0\UserAdmin\Library\Oracle Data Access*.dll" "C:\eBusiness\Dev4.0\UserAdmin\IL.UserAdmin.Web\bin\" 2>nul" exited with code 9009.

Thanks in advance.

1

1 Answers

3
votes

It looks like maybe xcopy.exe can't be found in the path in the TeamCity build agent environment. I would verify that xcopy.exe is on the build agent and that it is in the path.

Verify the path for the environment that the post build step is running in by adding this to the post build step to echo the path in the log:

SET PATH

If xcopy is on the machine but not in a path in the echoed path output then you would need to use a full path in your post build step like this:

"%SystemRoot%\System32\xcopy.exe"

Alternately you can fix the PATH variable on the agent to make sure xcopy is in the path.