Monday, November 21, 2022

[FIXED] How to find the reason for a failed Build without any error or warning

Issue

I have a WebApplication which contains reference to WCF services.

While building using Visual Studio 2010, Build fails without any error or warning. However building the .csproj using MsBuild is successful.

Can't figure out what should I try in Visual Studio, to resolve / diagnose the issue. Can you please help out?

I find out that the build has been failing,

  1. From text displayed in status Bar.
    enter image description here

  2. From output window:

     ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
    

    The output tab includes configuration details.

    ------ Build started: Project: <projectName here> Configuration: Debug Any CPU
    

Solution

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.

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.

Screen capture from Visual Studio showing the modified setting.



Answered By - Richard J Foster
Answer Checked By - David Goodson (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.