C++: Project always out of date when running in Visual Studio

A little while ago, I ran into a weird problem. My application compiled fine in Visual Studio 2010, but when I tried to Debug it, it would ALWAYS say that a certain C++ project (always the same one) was out of date and asked me if I wanted to build it. But if I had just done so!

The first thing you'll want to try is to do a full clean and build of your solution. If after that the problem is still there, try this:

  1. Enable logging for C++ projects build.
  2. Download, unzip and run DebugView from SysInternals. Those people make great tools, check them out!
  3. Add a filter to Debug View using the name of your project. If you don't do this, DebugView will drown you in a sea of log messages.
  4. Build again.
  5. Take a look at DebugView's log messags. In my case, my error was something like this [42216] Project 'YourCrazyProject.vcxproj' not up to date because build input 'YourWackyReference' is missing.
  6. Delete or fix that dependency from Visual Studio's Solution Explorer.
  7. Have a drink (you earned it!)

Comments

Popular posts from this blog

VB.NET: Raise base class events from a derived class

Apache Kafka - I - High level architecture and concepts

Upgrading Lodash from 3.x to 4.x