Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio "Rebuild all failed"

Why does Rebuild fail with no errors?

Since this morning, this error keeps showing up. I build the entire solution (25 C# managed projects) and a "Rebuild All failed" appears, but without any errors! (I have 13 warnings about COM not supporting Generics, but it's "normal" because one dll is exposed as COM.)

Screenshot of 0 Errors with "Rebuild All failed"

like image 361
AndreaCi Avatar asked Jun 15 '12 08:06

AndreaCi


People also ask

How do I rebuild all in Visual Studio?

To build, rebuild, or clean an entire solutionChoose Build All to compile the files and components within the project that have changed since the most recent build. Choose Rebuild All to "clean" the solution and then builds all project files and components. Choose Clean All to delete any intermediate and output files.

Does rebuild do a clean in Visual Studio?

For a multi-project solution, "rebuild solution" does a "clean" followed by a "build" for each project (possibly in parallel). Whereas a "clean solution" followed by a "build solution" first cleans all projects (possibly in parallel) and then builds all projects (possibly in parallel).

How do I rebuild a Visual Studio project?

To build or rebuild a single project In Solution Explorer, choose or open the project. On the menu bar, choose Build, and then choose either Build ProjectName or Rebuild ProjectName. Choose Build ProjectName to build only those project components that have changed since the most recent build.

Does rebuild also clean?

Rebuild solution will clean and then build the solution from scratch, ignoring anything it's done before. The difference between this and "Clean, followed by Build" is that Rebuild will clean-then-build each project, one at a time, rather than cleaning all and then building all.


3 Answers

Not an answer per se - but you're better off looking at the output window and seeing what it says there.

Also, to help with that you might want to look at your MSBuild verbosity - as shown on this screenshot (last two options):

Build options - Visual Studio

Beware - the highest level generates a MASSIVE amount of information.

Finally - running msbuild from the solution folder in a command prompt will really nail the issue - because error messages and warnings come up in red and yellow respectively.

like image 109
Andras Zoltan Avatar answered Oct 25 '22 10:10

Andras Zoltan


I found my own solution and it is simple:

When this error occurs, save the project and close VS 2013. After that, re-open VS2013 and open the last project.

It works like a charm. But it is very annoying every time!

Many people reported this problem in VS2010, VS2012 and VS2013.

like image 17
Umut D. Avatar answered Oct 25 '22 09:10

Umut D.


Could be a corrupt Solution User Options file.

Close the solution, delete its .suo (.v12.suo for VS2012+), reopen the solution, and Visual Studio will build a new one. You will lose the StartUp Project, breakpoints, bookmarks, which files are open, which projects/folders are expanded, etc. But that's all minor compared to the solution not building!

like image 3
Keith Robertson Avatar answered Oct 25 '22 10:10

Keith Robertson