Visual Studio Post Build Command Line Error MSB3073 Exit Code 1

So, I have a C ++ Player project that has 2 other project dependencies, both of which have post-build events, to copy the dll to another folder. The project was under construction, then he decided not to work randomly, and since then I have not found a solution. Even with a clean check from SVN, it still doesnโ€™t work, it works for all other developers except me.

I checked the paths in the error messages, they exist and like the target DLL.

Event after assembly in each dependent project:

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

Received error:

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

Current setting:

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

What I tried:

  • Updated version of Visual Studio 2013 Pro for Update 3 (from Update 1)
  • Copy quotes for each path with the / Y option, for example. copy / Y "source" "destination"
  • Tried xcopy.
  • Tried to clean and rebuild the eaach dependency individually.
  • Remote versions of Visual C ++ 2010 and 2012, x86 and x64 are distributed and reinstalled all 4 versions.

What else can I try?

+5
source share
2 answers

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

  <PropertyGroup> <_BuildSuffix> :VCEnd</_BuildSuffix> </PropertyGroup> 
+3
source

When I double-clicked on a compiler error, I was transferred to the same file ( microsoft.CppCommon.target ). However, this file was installed as part of the Visual Studio installation, it was not writable (due to its permissions) and thus seemed like a red herring. The contents of the file were the same as in @ user1883004 answer .

With the original control system, I did the following:

  • Close Visual Studio
  • Delete all files from the project root and force reload from the control source
  • Open Visual Studio and recompile.

Without a source control system, try this step: -

  • Close Visual Studio
  • Manually delete Debug / Release (or any other generated subdirectory)
  • Open Visual Studio and recompile.

Please note that neither Clean Solution nor Rebuild Solution worked for me.

+1
source

Source: https://habr.com/ru/post/1201404/


All Articles