Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

having to rebuild in VS 2010 after every modification

I am working in Visual Studio 2010, and I can go through and write code fine, and IntelliSense even works well, but when I go to run the compiler after modifying the code the changes don't always take. this happens in c++ Win32 console applications, c++ Windows applications, and c++ CLR console applications. It has even happened in C# XNA as well.

what I mean is that i will start coding a new program, and be writing code then go to build to check for errors, and then run the program, and it will work fine (if there were no errors). but then if I want to iterate the code to add features I implement (some of which should change output tremendously), and it is as though it was at the first build. also if I insert break points they don't always take either like they are being ignored as well (except for the ones in files that were untouched). though when I go to build at these times the compiler does throw errors correctly (inserted purposefully, and accidentally), and only at those points does it take all changes.

the only workaround that I have found is to go and do a full rebuild after every modification, but this shouldn't be necessary as I am not adding headers, or changing compile order. sometimes it will ignore the modification of a single character being changed in a cout.

summary:

  • compiler ignores changes made since last build
  • compiler ignores break points in modified files
  • have to perform full rebuild to have changes, and breakpoints take.

does anyone have any thoughts on this.

edit: it seems that changing Tools > options > "Projects and Solutions" > "Build and Run" > "on Run, when projects are out of date" to "Prompt to build" does fix the problem. though annoying to be asked every time it is less annoying then having to manually request a rebuild. need to do further iterations to see if this is not just superficial.

edit2: after continuing to iterate through current project it appears that this change does not fix the issue, but only for the main file, and any sub files still need a full rebuild to take modifications even small ones.

like image 905
gardian06 Avatar asked Mar 05 '12 01:03

gardian06


1 Answers

If its happening on all projects its probably the first fix mentioned in this answer

like image 60
Peter Wishart Avatar answered Oct 06 '22 06:10

Peter Wishart