我对构建后事件不太熟悉,因此我对程序出了什么问题感到有些困惑。在Visual Studio 2010中进行编译时,我得到以下信息:
The command "xcopy C:\Users\Me\Path\Foo.bar\Library\dsoframer.ocx C:\Users\Me\Path\Foo.bar\bin\Debug\ /Y /E /D
xcopy C:\Users\Me\Path\Foo.bar\ApplicationFiles C:\Users\Me\Path\Foo.bar\bin\Debug\ /Y /E /D
xcopy C:\Users\Me\Path\url\ C:\Users\Me\Path\Foo.bar\bin\Debug\ /Y /E /D
rmdir /S /Q C:\Users\Me\Path\Foo.bar\bin\Debug\.gwt-tmp" exited with code 4.
尽管出现此错误,该程序看起来仍然可以正常运行,但是我不想忽略这个问题,希望不会发生任何不良情况。奇怪的是,此行仅以单个命令(第一个xcopy)开始,但是随着我继续编译项目(修复其他问题,主要是引用),错误消息越来越大。知道会发生什么吗?
编辑:这是似乎失败的postbuild事件-
xcopy $(ProjectDir)Library\dsoframer.ocx $(TargetDir) /Y /E /D
xcopy $(ProjectDir)ApplicationFiles $(TargetDir) /Y /E /D
xcopy $(SolutionDir)com.myUrl.gwt\www $(TargetDir) /Y /E /D
rmdir /S /Q $(TargetDir).gwt-tmp
Xcopy退出代码4表示“发生初始化错误。没有足够的内存或磁盘空间,或者您在命令行上输入了无效的驱动器名称或无效的语法。 ”
看起来Visual Studio正在向xcopy提供无效的参数。通过检查您的构建后事件命令Project > Right Click > Properties > Build Events > Post Build Event
。
请注意,如果$(ProjectDir)
或相似的宏术语在展开时的结果路径中有空格,则需要将其用双引号引起来。例如:
xcopy "$(ProjectDir)Library\dsoframer.ocx" "$(TargetDir)" /Y /E /D1
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句