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

后端 未结 30 1080
旧时难觅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:44

    Seems that there are multiple answers to this question, so I'll add mine from personal experience hoping it will save someone time/stress.

    Make sure all the projects in your solution are targeting the same .NET version.

    Similar to OP, there were 0 errors but the build kept failing. However, there was one warning entry (buried in between several hundred useless XML warnings...) saying that one project was targeting a different .NET version than a project that was referencing it. The entire issue was that one project within my solution was targeting .NET 4.5.2, when the rest were targeting 4.5.1. It should work even with this discrepancy (hence why it was just a warning) but unfortunately, it broke the build.

    The strange part was that it built/ran fine for a while, but suddenly the build started failing one time causing this issue. Not sure what I did for it to start complaining about differing .NET target versions, but I feel that there are just some mysteries in Visual Studio that will never be solved.

提交回复
热议问题