How do I resolve error MSB6006: "cmd.exe" exited with code 3?
Asked Answered
E

3

5

I am getting the following error when building my code:

C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error      
MSB6006: "cmd.exe" exited with code 3.
Done executing task "CustomBuild" -- FAILED. (TaskId:40)

How do I resolve this?

Eadwine answered 21/1, 2015 at 12:22 Comment(2)
we need to see more of your custombuild code. From the very little that you've shown us, it look like you're trying execute a custom build on some file (header, text file, protobuf... etc??) but have the incorrect path to the file hence why cmd.exe exits.Splendent
Use View > Output so you can see the error message.Safeconduct
K
10

Open your .vcxproj file as a .xml file (so with Notepad++ or equivalent.)

You should be able to search the file for the "CustomBuild" tag.

Something in the task defined by that tag is failing.

You can test what it is by trying to run the commands in that task from the command line in the same directory as the .vcxproj.

If you can't solve your problem from there I'd recommend adding the "CustomBuild" task to the question so we can better help you.

Kristy answered 21/1, 2015 at 12:53 Comment(0)
C
2

If it is a project where vs2015 installed the QT plugin to write QT:

Click on QT -> Qt Project Settings -> Properties -> Version -> above to change to Default QtVersion -> right-click on the project to regenerate

Copenhagen answered 14/5, 2023 at 10:8 Comment(0)
V
0

I met the same error, then I tried a lot of things, but nothing worked. Finally I removed the project, created the new one, and added the previous files to it. The problem was solved. I compared the old and new projects,found that the old project's [Qt Project Settings] and other related functions were not available, while the new project was normal.

Vinegarette answered 25/8, 2022 at 3:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.