Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Post Build copy command error MSB3073 exit code 1

So I have C++ Player project which has 2 other project dependencies, both of which have post build events to copy the dll to another folder. The project was building, then it decided not to work randomly, and since then I have not found a solution. Even with a clean checkout from SVN, it still does not work, it works for all the other devs, apart from me.

I have checked the paths in the error messages, they do exist and as does the target dll.

Post-Build Event in each dependant project:

copy $(TargetPath) $(ProjectDir)..\..\$(Configuration)\plugins\$(ProjectName).dll

The resulting error:

error MSB3073: The command "copy C:\CMDev\CM2\Client\Apps\SSEP\Player\ACRP\CIAP\Debug\CIAP.dll C:\CMDev\CM2\Client\Apps\SSEP\Player\ACRP\CIAP....\Debug\plugins\CIAP.dll:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 131 5

Current setup:

  • Running Windows 7 Ultimate Service Pack 1
  • Visual Studio Pro v12.0.30723.00 Update 3, run under Administrator.

What have I tried:

  • Updated Visual Studio 2013 Pro to Update 3 (from Update 1)
  • Wrapping quotes around each path with the /Y parameter e.g. copy /Y "source" "destination"
  • Tried xcopy.
  • Tried clean and re-build of eaach dependency individually.
  • Uninstalled Visual C++ 2010 and 2012, x86 and x64 Redistributable, and re-installed all 4 versions.

What else can I try?

like image 288
user1883004 Avatar asked Aug 29 '14 10:08

user1883004


1 Answers

The problem was how VS was appending the :VCEnd suffix. Somehow the microsoft.CppCommon.targets file was modified incorrectly.

  <PropertyGroup>
      <_BuildSuffix>
:VCEnd</_BuildSuffix>
  </PropertyGroup>
like image 123
user1883004 Avatar answered Sep 29 '22 01:09

user1883004