In the past week or so, I've noticed that Visual Studio 2010 is not recompiling code unless I force it to. This is a C# 4.0 project with WPF. I hit F5, which seems like it used rebuild, if the code had changed, and then launch the app. Instead, it now says in the bottom left status bar "Build Successful" and launches the application. It doesn't actually rebuild the app, though. I can tell because:
- even if I make a large number of changes, it "compiles" very quickly and
- if I try to set a breakpoint, it gives the warning that the code has changed and doesn't
set the breakpoint.
This happens regardless of whether there are errors in the code or not, so I don't believe it's the thing where it launches an older version if the build fails.
If I instead select from the menu to rebuild the project, it then works. This kind of impedes my usual workflow, however. I semi-frequently forget to do this, and then spend 10 minutes trying to figure out what the hell is wrong with my changes. Even worse, sometimes there are build errors that I don't notice right away.
Pressing F6
to "rebuild" the solution does not do anything either. What settings might I have mucked with that would cause this behavior?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…