Reputation: 139
I'm new to Visual Studio, so I haven't gotten used to things yet. I've been using it for weeks with no problem, but today I've noticed that I have to click rebuild solution every time I make any changes to my code, otherwise it'll run an old version of the code. Is this a common thing? I've never had to do it until today, then all of a sudden I have to do it every time.
Upvotes: 2
Views: 1881
Reputation: 31606
C++ has multiple stages, the compile stage to the link stage. If code changes, VS has to build (compile) and then link those changes into the app. If a library changes, then VS needs to link in the library changes.
If you are having to rebuild everytime, then VS is detecting some type of change to either a C++ file or a linked in library. Finding what is changing will tell you why you have to rebuild to keep the exe (app) current.
On a side note, if you are debugging and the debugger seems to step into comments/places it shouldn't be...then your code is in need of being (re)-compiled and linked. For the pdb (debug) files are out of sync with the textual code files that were changed and that is why the debugger is behaving as such.
Upvotes: 1