Visual Studio 2015 project builds failed but no errors
Solution 1
I have had the same problem and closing and re-opening Visual Studio clears it up.
I had also tried Cleaning the solution and the Clean Failed as well.
There may be other scenarios where this does not do the trick, but in my case restarting has resolved this for me.
Solution 2
It's possible that you're not seeing all the build errors.
By changing the drop down list after the "Messages" icon from "Build + Intellisense" to "Build Only", you will be able to see errors thrown during the build that are not detected by Intellisense. See the screenshot below:
Solution 3
I've been seeing regular instances of VS2015 reporting "build failed" but not showing any errors in the error window. Coming from an ancient command line background, I finally went looking at the output window. The output window showed the compiler reporting errors but those errors were not being captured to the error window. I never saw this problem under VS2013.
The usual closing of VS and reopening of it hasn't cleared this condition. (In VS2013 this was a common way to kick XAML intellisense in the rear and make it stop fixating on an "error" that had been fixed.)
So far this has always been related to compilation errors in a XAML page CS file. I can't remember seeing it in a non-page CS file.
Until one figures out to go check the output window, things like intellisense reporting in the error window invalid references to objects in the XAML, but no compiler errors being shown in the error window can get VERY confusion since it "appears" like the errors are the intellisense reporting XAML errors. But they actually aren't. The XAML errors are just symptoms of CS files failing to compile but not having their errors reporting in the error window.
Solution 4
Deleting the hidden .vs
folder for worked for me for VS2015.
(Note that this is where the SUO files live now)
Solution 5
This might happen when you reference a different .net framework version project (v4.5.2 vs v4.5 in my case). Correcting this will fix your problem.
Related videos on Youtube
Rob Greenlee
Updated on May 11, 2021Comments
-
Rob Greenlee about 3 years
My project builds all fail but I'm not shown any errors. I tried cleaning and rebuilding, that didn't work.
I changed the MSBuild output verbosity to 'Diagnostic' hoping it would help me identify the problem and now I'm stuck. Here's what the output looks like:
1>Project 'ProjectMM.Data.Models' is not up to date. Input file 'C:\Projects\ProjectMM\ProjectMM.Data.Models\ProjectMM.Data.Models.csproj' is modified after output file 'C:\Projects\ProjectMM\ProjectMM.Data.Models\bin\Debug\ProjectMM.Data.Models.pdb'. All packages are already installed and there is nothing to restore. 1>------ Build started: Project: ProjectMM.Data.Models, Configuration: Debug Any CPU ------ 2>Project 'ProjectMM.Data' is not up to date. Input file 'C:\Projects\ProjectMM\ProjectMM.Data\ProjectMM.Data.csproj' is modified after output file 'C:\Projects\ProjectMM\ProjectMM.Data\bin\Debug\ProjectMM.Data.pdb'. 2>------ Build started: Project: ProjectMM.Data, Configuration: Debug Any CPU ------ 3>Project 'ProjectMM' is not up to date. Input file 'c:\projects\projectmm\projectmm\app_start\bundleconfig.cs' is modified after output file 'C:\Projects\ProjectMM\ProjectMM\bin\ProjectMM.pdb'. 3>------ Build started: Project: ProjectMM, Configuration: Debug Any CPU ------ ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
-
Karthik almost 9 yearsDoes your Error List window is showing up or not?
-
Karthik almost 9 yearsGo to View menu -> Select Error List and check if you have any errors. Ideally you should get it in Error List. Keep your Error List window in open and try building the project and see what happens..
-
Rob Greenlee almost 9 yearsSo, here's what just happened: I posted this question and assuming I wouldn't get a response right away, I closed the project. You prompted me to open it back up, open the error list and rebuild. It worked perfectly, no errors, all succeeded!
-
jpo38 about 7 years@RobGreenlee: See my answer, I bet the "Error tab" was active when you re-opened the solution!
-
-
Yinda Yin over 8 yearsFor those of you still struggling with an invisible errors window, it appears you can get the compiler errors to show up in the window by selecting Build Only in the Filter ErrorList To dropdown in the Error List window (the dropdown is not labelled... You can figure out which one it is by hovering the mouse over it and observing the tooltip).
-
Bastiaan Linders over 8 yearsIf it doesn't help to restart. I often encounter this problem when I add a project to my solution, with another Target framework referencing different framework projects.
-
cellik over 8 yearsIn my case restarting VS or cleaning the solution didn't help. However, removing the .suo under the .vs folder solved the problem
-
felickz over 8 years@RobertHarvey ... this is the key... but WHY in the world would Intellisense override the build?
-
David Gunderson over 8 years@RobertHarvey that was exactly it. Turns out, as someone here suggested I was referencing an incompatible .net project, but I couldn't tell what the problem was until I switched the output to "Build Only" in the Error pane. As soon as I did that it pointed me right to the issue. Thank you for the tip.
-
granadaCoder almost 8 yearsThis answer was the clue for me. Search for "error CS" (no quotes) for possible blocking build exceptions.
-
granadaCoder almost 8 yearsPS. My error was that I had used the same variable name in my method. "string x = string.Empty;" for example. I had an exception handler that also had a "string x" declaration in it.
-
FredyWenger almost 8 years@Keith: Did you ever solved the problem? I have exactly the same (build failed, error is NOT showed in error-list but in output-window). I work with VS2015 update 3 RC and strange wise have the problem only with my Xamarin.Forms project, where I don't have it in another VB.net project opened with the same VS2015).
-
KMC almost 8 years@cellik : It doesn't work in my case. What is worth..I'm using Enterprise edition.
-
KMC almost 8 yearsDude you are my savior!
-
Philip Schiff over 7 yearsRestarting VS worked for me, but now it's cropping up with every build! Do I really want to wait for VS to start (slowww) every time I build?
-
JustinMichaels over 7 yearsThis is crazy that we accept this as our solution. I have this same issue and it appears to be with a single new solution that was targeted against 4.6.1 framework. I have yet to have the other 30+ older solutions do this.
-
martinh_kentico over 7 yearsI had the same problem after changing my computer time from CEST time zone (GMT+1) to US time zone (GMT-7), it seems that it could not handle that the time stamp of the last build was in future. After restarting VS everything is OK.
-
Eric Milliot-Martinez over 7 yearsAfter leaving my computer locked over the weekend, I was having this problem and restarting Visual Studio 2015 (enterprise - update 3).
-
Johann Marx over 7 yearsDeleting the .suo files did the trick for me as well, restarting and cleaning did not.
-
CodyF over 7 yearsWhy would the "Build Only" errors not be present in "Build + Intellisense"?
-
Admin over 7 years@martinh_kentico, spot on.
-
John Demetriou over 7 yearsWhy isn't this answer more highly upvoted? It gives you the perfect solution to debug what is wrong
-
John Demetriou over 7 yearsIt's not just about figuring the problem, it's about learning how to troubleshoot the problem. This is why I included other answers debugging process, because that is what helped me find out what is wrong. Not just random guesses on what the problem might be
-
M B over 7 yearsno clue. I do use version control so it could be that got confused with the times???
-
TomK about 7 years@martinh_kentico, bingo! To the letter, this is what happened to me. I work in NJ, today on a trip to TN, opened Visual Studio, changed laptop time zone from Eastern to Central and blam. Closed/Reopened, and all is well.
-
Drew about 7 yearsThis helped with showing the errors in the error list, but the lines of code with the errors have no red underlines. I'm guessing this must be an Intellisense issue then.
-
Drew about 7 yearsThis was exactly my problem. Added a new project to the solution which was v4.5.2 and I referenced it from another project which was v4.5. Switched the new project to v4.5 and it worked fine.
-
jpo38 about 7 yearsCheck my answer below. I aslo thought your solution was right but I realized that even with the "Diagnostic" output level, my "Error tab" would remain empty. As other ones, you most likely kept the "Error tab" active and that's why it started working fine...
-
HerrimanCoder about 7 yearsWorks for me. Mine had gotten switched to Build and Intellisense, which was hiding build errors. Build Only works and displays build errors.
-
I-A-N about 7 yearsThis solution worked for me. It happened to me once - no warnings were displayed. I opened the Error List window and rebuilt the solution. The warnings were displayed this time. I can't reproduce the same issue again even after restarting the VS.
-
MA9H almost 7 yearsYou sir saved the day for me.. great job.. Thanks a lot
-
valverij over 6 yearsThis was beyond frustrating. Apparently the issue is still open in a different ticket: github.com/dotnet/roslyn/issues/19693
-
S52 over 6 yearsPerfect! Worked for me :)
-
Dux almost 6 yearsThis rather old question already has an accepted answer, it doesn't seem as if your very short and undescriptive answer here adds much to it. Also, please do not link to images on external sites but add the images to your answer!
-
Søren Boisen over 5 yearsWow, this is an amazingly dumb error to have in an IDE! I just experienced it in VS2017. No info in the build output and nothing in the error list. But switch from "Build + Intellisense" to "Build Only" and an error due to lack of cast of dynamic appears!
-
kselva over 4 yearsit really works ... no need need restart and all.... before it was build+intellisence and i have changed to only intellisence
-
Chandraprakash about 4 yearsDamn man, It was in Build+Intellisense for me, when i changed to Build Only i could see the errors popping up !! Thanks you !! You saved my day !
-
immutabl almost 4 yearsThanks so much - this was driving me insane all afternoon :-)
-
Zi Cold over 3 yearsThis solution worked for me (MS VS 2017). After all other solutions.
-
SQLServerSteve over 3 yearsThis fix did the trick for me in VS 2019. I just wanted to point out that I mysteriously found 40 instances of MsBuild running in Task Manager at the time, all of which closed when all my open instances of VS were closed. I watch Task Manager routinely and saw nothing out of the ordinary shortly before the error occurred. This may be a clue to the underlying problem, whatever it is.
-
David Neuschulz over 3 yearsI had a similar issue. I was running VS 2019 as administrator, When I finally tried running regularly, it worked. This was on a minimal VB HelloWorld app (1 form, 1 button, 1 label, that's all)