Error MSB6006: cmd.exe exited with code 1


  • I had build some projects in cmake and then when i run in vs2015 i am getting thing error
    Error MSB6006: "cmd.exe" exited with code 1
    its pointing to this line in microsoft.cppcommon.targets

    Sources ="@(CustomBuild)"
    BuildSuffix ="$(_BuildSuffix)"

    TrackerLogDirectory ="%(CustomBuild.TrackerLogDirectory)"
    MinimalRebuildFromTracking ="%(CustomBuild.MinimalRebuildFromTracking)"

    TLogReadFiles ="@(CustomBuildTLogReadFiles)"
    TLogWriteFiles ="@(CustomBuildTLogWriteFiles)"
    TrackFileAccess ="$(TrackFileAccess)"
    ToolArchitecture ="$(CustomBuildToolArchitecture)"
    TrackerFrameworkPath ="$(CustomBuildTrackerFrameworkPath)"
    TrackerSdkPath ="$(CustomBuildTrackerSdkPath)"

    AcceptableNonZeroExitCodes ="%(CustomBuild.AcceptableNonZeroExitCodes)"

    can anyone suggest me how to resolve this problem. I tried by changing setting and downloaded the buildtools again and installed

    • Edited by varshaaaa Monday, December 4, 2017 11:41 AM
    Monday, December 4, 2017 11:09 AM


  • Hi varshaaaa,

    Thanks for posting here.

    According to the MSBuild error " MSB6006: "cmd.exe" exited with code 1", this error means you may have incorrect command line in your project. I suggest you check your project property->Build Events, see if there has some custom build events that failed and open your project file .vcxproj check if there has some custom build targets, if yes, check carefully what's going inside the targets, the path is right? or you can try to use substitute target:

      <Message Text="This is test info"></Message>
    If above not help you, you can share your custom build targets or build event command to me, I will check it.

    Hope this helps.

    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    • Marked as answer by varshaaaa Tuesday, December 5, 2017 7:20 AM
    Tuesday, December 5, 2017 6:58 AM