Monday, June 5, 2017

How to enable build debugging in MSVS 2015?

Leave a Comment

I have a project in MSVS 2015 which keeps spuriously rebuilding every time, i.e. building always launches MSBuild which then gives a bunch of "All outputs are up-to-date." messages followed by "Build succeeded." instead of just doing nothing, as it should. In the previous versions of MSVS there was a (never documented AFAIK) way to enable verbose debug logging to quickly find the reason for this as explained e.g. here. Unfortunately this doesn't seem to do anything with MSVS 2015.

Does anybody know what has replaced it or some other way of debugging this problem?

1 Answers

Answers 1

I had a very similar problem checking out and unzipping some files that had a future date on them. This caused the entire project to rebuild even with no changes.

On *nix system, I would have used touch to fix, but on Windows I used the FOR command on cmd.exe:

FOR /R %I in (*.*) do copy /b "%I" +,, 

Which updates the timestamp to current (iirc).


Before I figured it out, I tried to change the verbosity of the build process. You need to restart VS2015 after changing this setting:

Tools->options Projects&Settings->Build and Run;  Build Output : Verbose


Also, turn on the startup banner using Configuration Properties -> C/C++ -> General. This gives you some more build commands.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment