Check if you’re seeing the following output in the build pane:

  Creating ".unsuccessfulbuild" because "AlwaysCreate" was specified.

I’ve just fixed a bunch of these errors in one of our solutions here and all of these were caused by one of two issues:

  • The project file referenced files that were no present in the source tree
  • A custom build step either was supposed to generate a file but didn’t, or the file ended up in the wrong place

In order to find out if there are missing files that trigger the perma-rebuild, you’ll also have to enable Visual Studio’s debug output as described in this stackoverflow answer.

4 thoughts on “If your VS2010 C++ build is constantly rebuilding a project that hasn’t changed…”

  1. I just had a client of mine fix one of these issues in one of the solutions that I sent them; I had it on my list of things to fix but hadn’t got around to it… Anyway, we had to go to “Tools, Options, Projects and Solutions, VC++ Project Settings” and set Solution Explorer mode to “show all files” to actually SEE the files that didn’t exist and that were causing the rebuild. I didn’t even know that option existed 🙂

    1. I’ve never heard of this option either, but given that I’ve still got one or two projects that like rebuilding themselves at odd times, I think I’ll try to make use of it!

    2. “Show all files” won’t help you. All it does is cause all files that are in the solution’s directory to be shown in the solution explorer, but those files probably aren’t being built by the project.

Leave a Reply