How to find reason of failed Build without any err

2020-02-16 06:55发布

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?

EDIT:

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 ==========
    

30条回答
你好瞎i
2楼-- · 2020-02-16 07:12

This happened to me after adding a new page to an asp.net project.

What I did was exclude the page, get it to build again successfully.

Then I added back the page with all the code commented out. Success.

Then I uncommented the code bit by bit and then it all worked.

查看更多
来,给爷笑一个
3楼-- · 2020-02-16 07:13

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

查看更多
别忘想泡老子
4楼-- · 2020-02-16 07:13

Firstly "Clean the Solution" , then Rebuild soln.

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

Try these things, hope definitely works.

查看更多
冷血范
5楼-- · 2020-02-16 07:14

A different way to reproduce this symptom:

I added a new project to an existing solution and the build output reported errors like "the type or namespace name X could not be found..." but no errors were presented in the error list.

The classes I referred to were in other projects (that were referenced) in the same solution.

It turned out that I by mistake had selected an earlier version of .net in the new project. Once I changed to the same version as the other projects, everything built without any errors.

查看更多
姐就是有狂的资本
6楼-- · 2020-02-16 07:15

I faced the same problem! Just delete bin folder and restart your VS. That's all. tested in VS 2013.

查看更多
Melony?
7楼-- · 2020-02-16 07:15

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.

查看更多
登录 后发表回答