title: Visual Studio Rebuilds unmodified projects
body: <p>So, as the title reads, I have a VS2010 solution with ~50 projects in it right now. If I make a change to a "top level" project that nothing references then VS still rebuilds all 50 projects. I'm running Visual Studio 2010 Ultimate without any add-ons. I am using ILMerge to consolidate all of the projects into a single file.</p>
  
  <p>I have verified this by checking the time stamps of the lower level dlls and see that they are indeed rebuilt even though their code wasn't touched.</p>
  
  <p>I've read all responses and comments for:</p>
  
  <p><a href="https://stackoverflow.com/questions/5345784/visual-studio-2008-keeps-rebuilding">Visual Studio 2008 keeps rebuilding</a></p>
  
  <p><a href="https://stackoverflow.com/questions/2991972/visual-studio-keeps-building-everything">Visual studio keeps building everything</a></p>
  
  <p><a href="https://stackoverflow.com/questions/6901683/strange-vs2010-build-glitch-occurs-in-my-solution?lq=1">Strange VS2010 build glitch occurs in my solution</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5429781/reasons-for-c-sharp-projects-to-rebuild-in-visual-studio">Reasons for C# projects to rebuild in Visual Studio</a></p>
  
  <p>But most of them just offer suggestions on unloading projects to speed up build times but nothing concrete as to a fix. I'm trying to figure out why VS thinks these dependent projects need to be rebuilt when they don't and fix it.</p>
  
  <p>I've turned on 'Tools > Options > Projects and Solutions > Build and Run > Only build startup projects and dependencies on run' but with no effect.</p>
  
  <p>Also, if I just rebuild a "mid-level" project that only has 8 (in)direct dependencies then it still builds all 8 projects even though ILMerge isn't invoked and none of the dependent projects have been modified.</p>
  
  <p>Thank you everyone for any insight you may be able to provide.</p>
  
  <p><strong>Added</strong></p>
  
  <p>To test some of the suggestions I created a new WinForms project from scratch. I then created two new projects inside that solution. I copied all of the code and resources (not project file) from my two 'lowest level' projects into the two brand new projects (I did this by dropping the files and folders from Explorer onto the project in Visual Studio).</p>
  
  <p>The lowest project, let's call it <strong>B</strong>, did not reference any other project. The next project, <strong>A</strong>, referenced <strong>B</strong> only. So once I added the required .NET and external assembly references to the projects then the solution would build.</p>
  
  <p>I then had my new WinForm project reference <strong>A</strong> and did a full build. So the ref chain is:</p>
  
  <p><strong>WinForm</strong> -> <strong>A</strong> -> <strong>B</strong></p>
  
  <p>I then modified <strong>WinForm</strong> <em>only</em> and did a standard build (F6). As before, Visual Studio rebuilt all three projects.</p>
  
  <p>After some systematic eleminiation of source files in project <strong>B</strong> I found that if I removed my <code>Resources.Designer.cs</code> and <code>Resources.resx</code> (and commented out the code that made use of the <code>.Properties.Resources</code> object of those resources) then a modification of <strong>WinForm</strong> would no longer rebuild the entire solution and would only rebuild <strong>WinForm</strong>.</p>
  
  <p>Adding the <code>Resources.resx</code> and <code>Resources.Designer.cs</code> back to project <strong>B</strong> (but leaving the referenced code commented out so that nothing was making use of the resources) would re-introduce the full build behavior.</p>
  
  <p>To see if perhaps my resource files were corrupted, I deleted them again and then created a new one (via Project Properties -> Resources) and re-added the same resource as before, which was a single Excel file. With this setup the full rebuild would still occur.</p>
  
  <p>I then removed the single resource, but left the resource file in project <strong>B</strong>. Even with no resources added, but the resource file still in the project, the full (unneeded) rebuild would occur.</p>
  
  <p>It appears that just having a resource file added to a (.NET 3.5) project will cause Visual Studio 2010 to always rebuild that project. Is this a bug or intended/expected behavior?</p>
  
  <p>Thanks all again!</p>