tags:

views:

39

answers:

1

Hey all,

I have a project that has a post-build event that xcopies a dll to a certain directory:

xcopy "$(TargetDir)$(TargetName).dll" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y xcopy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y

However, I have CruiseControl.NET set up as a build server and MSBuild is failing on building that project due to this xcopy post-build event:

MSB3073: The command "xcopy "C:\Build\Services\Windows\VehicleServer\Plugins\Payload\bin\Debug\Payload.dll" "Undefined..\UdpLocationService\bin\Plugins\" /d /y xcopy "C:\Build\Services\Windows\VehicleServer\Plugins\Payload\bin\Debug\Payload.pdb" "Undefined..\UdpLocationService\bin\Plugins\" /d /y" exited with code 4. in Microsoft.Common.targets(3397, 13)

Any suggestions to get this fixed? Thanks,

Justin

A: 

Follow these steps:

  • Unload your project file (e.g. *.csproj)
  • Open your project file for editing
  • Find the AfterBuild target
  • Separate out the two invocations of XCopy into two distinct Exec tasks
  • Save your changes and Reload your project file
Jim Lamb
Thanks, that fixed the first error but not the second:MSB3073: The command "xcopy "C:\Build\Services\Windows\VehicleServer\Plugins\Payload\bin\Debug\Payload.pdb" "*Undefined*..\UdpLocationService\bin\Plugins\" /d /y" exited with code 4. in Microsoft.Common.targets(3397, 13)
Justin
I should also add that there is no AfterBuild or exec in the csproj file. This is what it looks like: <PropertyGroup> <PostBuildEvent>xcopy "$(TargetDir)$(TargetName).dll" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y</PostBuildEvent> <PostBuildEvent>xcopy "$(TargetDir)$(TargetName).pdb" "$(SolutionDir)..\UdpLocationService\bin\Plugins\" /d /y</PostBuildEvent> </PropertyGroup>
Justin
What version of Visual Studio are you using?
Jim Lamb