转帖自: http://blog.youkuaiyun.com/xxfigo/archive/2007/11/21/1897155.aspx
一直被一个问题所困扰,那就是运行CLR—Windows窗体应用程序的时候,即使什么代码也不写,直接编译运行也会报错:“error PRJ0003 : 生成 cmd.exe 时出错” 。
一直在查找资料,看到是因为VS2005的环境变量设置不对,应该如下解决:
solution:
tools=> Options => Projects and Solutions -> VC++ Directories page
then place below rows:
$(SystemRoot)/System32
$(SystemRoot)
$(SystemRoot)/System32/wbem
但是我一直没有找到Projects and Solutions ,最后才发现原来是由于“工具”-〉“选项”里的“显示所有设置”没有勾选,只要勾上就会有“项目和解决方案”的选项,在该项目下添加
$(SystemRoot)/System32
$(SystemRoot)
$(SystemRoot)/System32/wbem
就OK了。
本文解决了在Visual Studio 2005中运行CLR—Windows窗体应用程序时出现的“errorPRJ0003:生成cmd.exe时出错”问题。通过正确设置环境变量,即在“工具”->“选项”->“项目和解决方案”->“VC++目录”页面中添加$(SystemRoot)/System32等路径。
9678

被折叠的 条评论
为什么被折叠?



