devenv命令行不显示有缺陷项目的错误 [英] devenv command line does not show error for defective projects
问题描述
我们使用Jenkins自动构建我们的解决方案.我们通过命令行调用devenv(Visual Studio 2010):devenv PathToProject \ Project.sln/build Release
We use Jenkins to build our solutions automatically. We call devenv (Visual Studio 2010) by a command line: devenv PathToProject\Project.sln /build Release
当解决方案包含有缺陷的项目(* .vdproj,*.csproj)时,在Visual Studio IDE中打开解决方案将导致错误消息.但是,当使用上述命令行构建解决方案时,根本不会显示任何错误消息,因此Jenkins报告成功.
When the solution contains a defective project (*.vdproj, *.csproj), opening the solution in the Visual Studio IDE will result in an error message. But when building the solution with the above command line, no error message is shown at all, and consequently Jenkins reports success.
如果要重现此问题,只需在编辑器中打开vdproj文件,然后在文件中的某个位置删除}.
if you want to reproduce the problem, just open the vdproj file in an editor, and remove a } somewhere in the file.
该问题如何解决?
推荐答案
在Visual Studio 2012上,/Out
将生成消息写入文本文件.
On Visual Studio 2012, /Out
writes the build messages to a text file.
devenv.exe YourVisualStudioSolution.sln /build "Debug|Win32" /Out "YourLogFile.txt"
根据MSDN ,此开关也应该在Visual Studio 2010上也可以使用.
According to MSDN, this switch should work on Visual Studio 2010 as well.
这篇关于devenv命令行不显示有缺陷项目的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!