如何在没有任何错误或警告的情况下找到构建失败的原因 [英] How to find reason of failed Build without any error or warning
问题描述
我有一个WebApplication,其中包含对WCF服务的引用.
I have a WebApplication which contains reference to WCF services.
在使用Visual Studio 2010进行构建时,构建失败,没有任何错误或警告.但是,使用MsBuild
构建.csproj
是成功的.
While building using Visual Studio 2010, Build fails without any error or warning. However building the .csproj
using MsBuild
is successful.
无法弄清楚我应该在Visual Studio中尝试解决/诊断问题的方法.你能帮忙吗?
Can't figure out what should I try in Visual Studio, to resolve / diagnose the issue. Can you please help out?
我发现构建失败了,
-
来自状态栏中显示的文本.
From text displayed in status Bar.
在输出窗口中:
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
推荐答案
我遇到了类似情况.就我而言,是一个自定义操作(来自Nuget.org上的MSBuildVersioning包- http://www.出现在csproj文件的BeforeBuild目标中的nuget.org/packages/MSBuildVersioning/)失败了,而没有在正常位置触发任何错误消息.
I just ran into a similar situation. In my case, a custom action (from the MSBuildVersioning package available on Nuget.org - http://www.nuget.org/packages/MSBuildVersioning/) which appeared in the csproj file's BeforeBuild target was failing without triggering any error message in the normal place.
我能够通过设置"MSBuild项目的构建输出详细程度" 来确定这一点(在最新的Visual Studio的工具"标签中[路径:工具>选项>生成并运行])以"诊断"如下所示.然后,这表明自定义操作(在我的情况下为HgVersionFile)失败了.
I was able to determine this by setting the "MSBuild project build output verbosity" (in the latest Visual Studio's Tools tab [Path: Tools > Options > Build and Run]) to "Diagnostic" as shown below. This then showed that the custom action (in my case HgVersionFile) was what had failed.
这篇关于如何在没有任何错误或警告的情况下找到构建失败的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!