Reputation: 91
I have a solution on VS 2010 that has been building without errors, then out of no where the build started failing with the following error :-
**error MSB3073: The command "xcopy "C:\Program Files\Microsoft SDKs\Kinect\Developer Toolkit v1.5.1\Redist\amd64\FaceTrackLib.dll" "C:\Users\HP\Documents\FaceTrackingVisualization\Out\SingleFace\x64\Debug\" /eiycq
xcopy "C:\Program Files\Microsoft SDKs\Kinect\Developer Toolkit v1.5.1\Redist\amd64\FaceTrackData.dll" "C:\Users\HP\Documents\FaceTrackingVisualization\Out\SingleFace\x64\Debug\" /eiycq
:VCEnd" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 113 6 SingleFace**
I have no idea, in the solutions online people say to look for spaces or indentation errors but i dont understand where to edit these changes.. the error points me to these code lines the error line is the bold line
Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'"
Message Text="Description: %(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''"/
**Exec Command="%(PostBuildEvent.Command)$(BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/**
/Target
Upvotes: 9
Views: 15526
Reputation: 2207
In my case i had to change $(MSBuildBinPath)\msbuild.exe in my Post-build events to "$(MSBuildBinPath)\msbuild.exe" because the path contained blanks.
As a side note: i only had to do that in VS 2013 - both VS 2012 and 2010 could handle this without the quotes.
Upvotes: 9
Reputation: 942518
This will happen when some crappy installer has destroyed the system environment, particularly the PATH environment variable. So msbuild can no longer execute the xcopy.exe program.
Get basic diagnostics by starting a command prompt and typing PATH
. Verify that you see c:\windows\system32 listed. Then type where xcopy.exe
and verify that you get only one hit, the one in c:\windows\system32. Then type xcopy /?
to verify that you can run xcopy. If you don't know how to fix it then ask at superuser.com
Upvotes: 5
Reputation: 3005
right click on your project in the Visual Studio Solution Explorer and choose "properties" to access the project properties window, click on "Build Events" and you will see two textboxes with pre/post build steps.
check that all the paths in the postbuild step are correct and valid.
try setting the full path to the xcopy command c:\windows\system32\xcopy.exe
Upvotes: 1