c++log4cpp

MSB3073: The command "mc :VCEnd" exited with code 1


I am trying to compile log4cpp_x86 in visual studio 2019, but it gives me the error as below,enter image description here

I tried to change the location of the project from D: to C:, but still problem persist, and also I unmarked the folder as ReadOnly but it also doesn't work.

also when I click on the error i.e marked with MSB3073 it redirects me to the line in Microsoft.CppCommon.targets, which has the xml tag as:

  <Exec Command="%(CustomBuildStep.Command)$(_BuildSuffix)"/> 

Solution

  • As link is suggested by the @HansPassant its the half solution in my case, but before following procedure suggested in that link, I replaced the whole log4cpp project having corrupted solution file with xml tag as below,

    <CustomBuildStep> <Command>mc $(InputPath)</Command> </CustomBuildStep>
    

    with old project having solution file with below tags,

    <CustomBuild Include="..\NTEventLogCategories.mc">
          <Command Condition="'$(Configuration)|$(Platform)'=='Debug with Boost|Win32'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h "$(OutDir)" -r "$(OutDir)" "$(ProjectDir)..\%(Filename).mc"
    rc.exe -r -fo "$(OutDir)%(Filename).res" "$(OutDir)%(Filename).rc"
    link.exe /MACHINE:IX86 -dll -noentry -out:"$(OutDir)NTEventLogAppender.dll" "$(OutDir)%(Filename).res"
    </Command>
          <Command Condition="'$(Configuration)|$(Platform)'=='Debug with Boost|x64'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h "$(OutDir)" -r "$(OutDir)" "$(ProjectDir)..\%(Filename).mc"
    rc.exe -r -fo "$(OutDir)%(Filename).res" "$(OutDir)%(Filename).rc"
    link.exe /MACHINE:IX86 -dll -noentry -out:"$(OutDir)NTEventLogAppender.dll" "$(OutDir)%(Filename).res"
    </Command>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug with Boost|Win32'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug with Boost|x64'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h "$(OutDir)" -r "$(OutDir)" "$(ProjectDir)..\%(Filename).mc"
    rc.exe -r -fo "$(OutDir)%(Filename).res" "$(OutDir)%(Filename).rc"
    link.exe /MACHINE:IX86 -dll -noentry -out:"$(OutDir)NTEventLogAppender.dll" "$(OutDir)%(Filename).res"
    </Command>
          <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h "$(OutDir)" -r "$(OutDir)" "$(ProjectDir)..\%(Filename).mc"
    rc.exe -r -fo "$(OutDir)%(Filename).res" "$(OutDir)%(Filename).rc"
    link.exe /MACHINE:IX86 -dll -noentry -out:"$(OutDir)NTEventLogAppender.dll" "$(OutDir)%(Filename).res"
    </Command>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Command Condition="'$(Configuration)|$(Platform)'=='Release with Boost|Win32'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h $(OutDir) -r $(OutDir) $(ProjectDir)..\%(Filename).mc
    RC.exe -r -fo $(OutDir)%(Filename).res $(OutDir)%(Filename).rc
    link.exe /MACHINE:IX86 -dll -noentry -out:$(OutDir)NTEventLogAppender.dll $(OutDir)%(Filename).res
    </Command>
          <Command Condition="'$(Configuration)|$(Platform)'=='Release with Boost|x64'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h $(OutDir) -r $(OutDir) $(ProjectDir)..\%(Filename).mc
    RC.exe -r -fo $(OutDir)%(Filename).res $(OutDir)%(Filename).rc
    link.exe /MACHINE:IX86 -dll -noentry -out:$(OutDir)NTEventLogAppender.dll $(OutDir)%(Filename).res
    </Command>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Release with Boost|Win32'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Release with Boost|x64'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h $(OutDir) -r $(OutDir) $(ProjectDir)..\%(Filename).mc
    RC.exe -r -fo $(OutDir)%(Filename).res $(OutDir)%(Filename).rc
    link.exe /MACHINE:IX86 -dll -noentry -out:$(OutDir)NTEventLogAppender.dll $(OutDir)%(Filename).res
    </Command>
          <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(VS100COMNTOOLS)vsvars32.bat" if not exist $(OutDir) md $(OutDir)
    mc.exe -h $(OutDir) -r $(OutDir) $(ProjectDir)..\%(Filename).mc
    RC.exe -r -fo $(OutDir)%(Filename).res $(OutDir)%(Filename).rc
    link.exe /MACHINE:IX86 -dll -noentry -out:$(OutDir)NTEventLogAppender.dll $(OutDir)%(Filename).res
    </Command>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
          <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)NTEventLogAppender.dll;%(Outputs)</Outputs>
        </CustomBuild> 
    

    And then I followed the steps of the link as suggested by @HansPassant, however I didn't followed first step(i.e. download new version of log4cpp) in that link, rather I replaced the project with old project and then followed all the procedure according to suggestions in that link, and that solved my problem.