How to find reason of failed Build without any error or warning
Solution 1
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.
Solution 2
Build + Intellisense swallowed the error messages. Selecting Build Only displayed them.
Solution 3
- If solution contains more than one project, try building them one at a time.
- Try restart Visual Studio.
- Try restart Computer.
- Try "Rebuild all"
- Try "Clean Solution" then remove your "vspscc" files and "vssscc" files and then restart Visual Studio and then "Rebuild All".
Solution 4
VS (2013 Pro, Win 8.1) restart did it for me.
Solution 5
Delete .vs folder & restart VS, worked for me
Related videos on Youtube
Abhijeet
Updated on July 08, 2022Comments
-
Abhijeet almost 2 years
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
usingMsBuild
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,
From text displayed in status Bar.
From output window :
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
-
Sam I am says Reinstate Monica over 11 yearshow do you know that your build is failing?
-
Abhijeet over 11 years@SamIam Updated question to indicate this.
-
Malice over 11 yearsIs there anything in the output tab?
-
Abhijeet over 11 years@Malice It includes configuration details. ------ Build started: Project: <projectName here> Configuration: Debug Any CPU ------
-
Maxim Kornilov over 11 yearsTry to increase verbosity of the Output Window in Visual Studio. It can help to determine the problem. How to increase verbosity level: blogs.msdn.com/b/saraford/archive/2008/10/07/…
-
comecme over 11 yearsHave you tried restarting VS2010 or even rebooting your PC?
-
Malice over 11 years@autrevo: There might be something in your computer's event log. See neovolve.com/post/2010/09/10/… for more information.
-
DJ Burb over 11 yearsOr try to clean you solution and rebuild all, then run it.
-
Abhijeet over 11 years@MaximKornilov I did increase verbosity to Diagnostic mode. But couldn't find much useful info.
-
Nahuel Ianni about 10 yearsIt's been two years since the original post, given that you modified the question 3 minutes ago, do you still have the problem?
-
Abhijeet about 10 years@NahuelI. I got similar problem once again in another project, when I searched stackoverflow I got my own question back :-)
-
Abhijeet about 10 years@NahuelI. Last time there was an issue in
.csproj
which we had to edit manually to fix the issue. As suggested in comments I have tried to change msbuild verbosity to diagnostics but I don't see an error. -
Nahuel Ianni about 10 years@Abhijeet Just to try stuff, did you try closing VS, deleting the bin and obj folder, opening VS and compiling again?
-
Moby Disk almost 10 yearsPost the result from the output window. The problem can't be solved without more information because at this point, the community has no code, no error message, and no output.
-
f470071 over 8 years@Abhijeet Did you find the solution and if - what is it?
-
alelom about 2 yearsIn my case, compiling the projects one at a time helped. I didn't get any error when doing Rebuild All (even cleaning/reopening/etc), except when I went singularly and did
Build
on every single project. One of the projects in the chain had errors that popped up only like this. Fixing the errors allowed me to compile the solution. The verbosity option wasn't useful to me, just too many lines to parse.
-
Dovydas Navickas about 8 yearsWell, building a project at a time might not be necessary, but one thing is for sure: carefully look at the output window (of better yet copy/paste it to notepad and use Ctrl + F find) for a word "missing". It'not showing up in the errors list, but it sure as hell breaks your solution. -.-
-
Alex Zhukovskiy over 7 yearsAnd when it doesn't help should I just find a new job?
-
Jmaurier over 7 yearsJust restarting VS2013 helped me. I was working on a VM with limited resources but I'm not sure if that had anything to do with it.
-
Fijjit over 7 yearsTurns out I'd added a new project and it had a different .Net target framework version - I fixed that and, although the build still failed, I was then able to see the error that was breaking the build. Thanks.
-
sirdank over 7 yearsFor anyone who is clueless like me: to use this method you may have to search the contents of the output window. My build errors were being hidden by
#pragma warning disable
statements and were only visible when I searched 'error' in the output window. -
TxRegex over 7 yearsAfter setting my verbosity to diagnostic, I discovered I was getting a System.OutOfMemoryException. I was using 98% of my computer's available memory. This is a great answer!
-
maplemale over 7 yearsVS 2015 Community Win 7 with a single MVC Project. Same resolution.
-
niico about 7 yearsalso select 'build only' not 'build + intellisense' in errors filter.
-
Renat Khabibulin almost 7 yearsIn my case it was a project with .Net 4.5 references project with 4.5.2. Detailed diagnostic helper to find it out
-
H. Aydin over 6 yearsYou cannot clean the solution if you are having this issue.
-
DreamTeK almost 6 yearsVS 2017 Community Win 10. I guess I should of tried turning it off and on again before searching for a solution!
-
Ivan Kaloyanov almost 6 yearsThis is a comment
-
EliSherer almost 6 yearsWhat helped me is closing all instances of VS (not enough to close the faulty one), and then delete the
.vs
folder and start VS again. -
AaronLS about 5 yearsFor me I was using Queue New Build to build on TFS and the Queue Build dialog has a verbosity on the second tab I could turn up and then see the problem in the build log.
-
Imad almost 5 yearsJust got into the situation where none of these shows error :(
-
Tys about 4 yearsAdded a reference to another project in the solution. Somehow something went wrong. References list in the Solution Explorer stated that it was there. Only after switching to diagnostic mode, the output window told me that there was something wrong with that reference. Removed it and added it again, and problem solved.
-
Carter about 4 yearsWow, this worked for me how in the heck is this a thing in VS 2019's new version. Thanks man!
-
DAG almost 4 yearsWhen I attempted to resolve this by deleting bin and obj folder it fixed it. Also I required admin rights to delete the obj folder so something very strange had happened.
-
DudeManGuy almost 4 yearsMy solution was to wipe VS off my disk and use notepad
-
Mariano Luis Villa over 3 yearsThanks! If you don't find the specific error but suspect this is the issue, you can try changing the project's TF to a higher one. That was it in my case.
-
ourmandave over 3 yearsVS 2019 Pro Win 7. The tradition continues. =(
-
MadMarc over 3 yearsVS 2019 Community 16.7.5, Windows 10. Some things will never change.
-
Hawkeye4040 over 3 yearsWow, that is so odd! Is that a bug in VS?
-
Liam over 3 yearsIt's worth noting what is actually in this folder
-
Arun Prasad E S over 3 years@Liam a lot of things, like cache, configuration settings etc. stackoverflow.com/a/48897202/5237614
-
nam over 3 years@RenatKhabibulin For my
VS2019
, just closing and restarting theVS2019
worked. -
Svet over 3 yearsthat is what i was looking for. project is not building after changes because of this folder
-
AAV over 3 yearsI had the same issue with Visual Studio 2019 showing the number of errors in the build diagnostics but not in the Error List. I was able to see errors in the error list by opening the project with Visual Studio 2017
-
Marc Roussel about 3 yearsWow this command showed the error which building inside VS didn't so I've been able to solve the error. The question now is why VS doesn't report the error while this command does
-
derekbaker783 about 3 years"First of all make sure all the projects in your solution are targeting the same .NET version". Including test projects.
-
gollumullog over 2 yearsyup. closed Visual studio deleted .vs folder and restarted and worked fine
-
InvalidBrainException over 2 yearsThis is still happening in VS 2022....
-
alelom about 2 yearsIn my case, compiling the projects one at a time helped. I didn't get any error when doing Rebuild All (even cleaning/reopening/etc), except when I went singularly and did
Build
on every single project. One of the projects in the chain had errors that popped up only like this. Fixing the errors allowed me to compile the solution. -
Waleed Al Harthi almost 2 yearsVS 2022 and Windows 11. Hello from the future!