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 ==========
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.
After updating a dll file, it turned out that the new file was targeting a higher verion of .NET Framework. The solution was to go to Project Properties and change the Target framework to the appropriate version.
Taken from this answer
After doing that, I found the real reason which was in fact a mistake with dependency projects. I project that I was depending on was built for different framework (newer) than mine. Thus creating the issue. The errors was only outputed when I put the Output Verbosity to Diagnostic
Deleting the hidden
.vs
folder for worked for me for VS2015.(Note that this is where the SUO files live now)
Check all your project Framework versions, and make sure they're all the same, or at least that project A doesn't reference project B when project B's .NET Framework version is higher.
What I did (after all the above, and it still wasn't working) was go through all the bin folders and clear them all out (ie the referenced projects too).
This worked for me, hope it does for you too.