Visual Studio 2015 project builds failed but no errors

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

Solution 1:

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:

Build

Solution 2:

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