Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does VS have to rebuild ALL of my projects every time I hit "Play"?

Do I have some weird setting that is making this happen? I only want to change the text of a message box (and no other assemblies depend on that one) yet VS rebuilds all of my projects and it takes forever. Any ideas?

like image 856
skb Avatar asked Sep 25 '09 23:09

skb


People also ask

Does Visual Studio rebuild do a clean?

For the “Rebuild” option, it will “Clean” then “Build” one project at a time in the set build order.

What is the difference between build rebuild and clean in Visual Studio?

To build, rebuild, or clean an entire solution Choose 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.


1 Answers

You can find out what is causing Visual Studio to think each project is out of date, and then address the issue directly.

  1. Select Tools → Options → Projects and Solutions → Build and Run.
  2. For the setting "MSBuild project build output verbosity:" select "Diagnostic".
  3. Build.

You will get a huge amount of output in the output window detailing exactly what the build is doing. Before building each project it will print out why it thinks it is out of date. An example of such output is:

Project 'Foo' is not up to date. Input file 'c:\Bar.cs' is modified after output file

These "not up to date" messages should point you to the real cause of the unnecessary builds, which you can then fix.

like image 148
Mark Meuer Avatar answered Oct 02 '22 22:10

Mark Meuer