错误MSB6006:“cmd.exe”退出与代码1 [英] error MSB6006: "cmd.exe" exited with code 1

查看:2485
本文介绍了错误MSB6006:“cmd.exe”退出与代码1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图使用2010构建我的VC ++代码时,我收到错误消息



> C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):错误MSB6006:cmd.exe退出与代码1。

请告诉我们如何解决这个问题?

解决方案今天有同样的问题,而我正在升级一些VC6项目到VC2012。



在我的情况下,这是因为一些客户构建的步骤中的操作失败。
在项目属性中,转到客户步骤,您可以在命令行编辑框中看到可能有一些东西。打开Windows提示并粘贴命令到它。



如果在项目属性自定义构建步骤中没有命令行,也许你应该检查每个文件的属性



如果命令行有一些宏,请将其替换为实际值。



您可以在VS输出窗口中回显命令:




  • cd%(somedir)%

  • echo%(somedir)%


$ b b

你不会错过这种方式。


When I'm trying to build my VC++ code using 2010 I'm getting the error message

> C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 1.

Please tell how to overcome this?

解决方案

I had the same problem today, while I was upgrading some VC6 project to VC2012.

In my case, it was because some of the operation in customer built steps failed. In project properties, go to customer step, you can see there maybe some something in command line edit box. Open a windows prompt and paste the command to it. Run, check if there is something wrong and fix it.

If there is no command line in the project property custom built step, maybe you should check properties of every single file of the project.

If the command line has some macro, replace it with an actual value.

Or you can echo the command in VS output window:

  • cd %(somedir)%
  • echo %(somedir)%

You won't miss it this way.

这篇关于错误MSB6006:“cmd.exe”退出与代码1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆