How to find reason of failed Build without any error or warning

后端 未结 30 942
旧时难觅i
旧时难觅i 2020-11-29 20:01

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

相关标签:
30条回答
  • 2020-11-29 20:30

    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.

    0 讨论(0)
  • 2020-11-29 20:30

    Go to output window , search for 'error' in output window, TADA

    0 讨论(0)
  • 2020-11-29 20:32

    I had the same problem after deleting a couple of forms. The errors popped up once I went into the code and did a "Show Definition" for one of the controls that I removed.

    I was also targeting a higher framework on one of my projects, so that might have been the issue as well.

    0 讨论(0)
  • 2020-11-29 20:34

    I want to expand on Sasse's answer.

    To fix the problem with Visual Studio 2015 Update 2 I had to build each project one at a time and look at the output window after each build.

    One project gave me

    "The type or namespace name 'SomeNamespace' does not exist in the namespace 'BeforeSomeNamespace' (are you missing an assembly reference?)".

    There was no error in the Error List window but the assembly had a yellow warning sign under "References".

    I then saw that the referencing project targeted 4.5.1 and the referenced project 4.6.1. Changing 4.6.1 to 4.5.1 allowed the overall build to succeed.

    0 讨论(0)
  • 2020-11-29 20:34

    Try building your project from the Powershell command line:

    dotnet build
    

    Then you can see any errors in the command line output even if Visual Studio is playing hide and seek with build error messages.

    0 讨论(0)
  • 2020-11-29 20:36

    Firstly "Clean the Solution" , then Rebuild soln.

    If won't work close the Solution and restart the solution.

    Try these things, hope definitely works.

    0 讨论(0)
提交回复
热议问题