Visual Studio always rebuild my project! :(

Started by
32 comments, last by Zeblar Nagrim 19 years, 9 months ago
I have problem with visual studio.Net 2003. Every time i press the build button it rebuild the project, even if the project is already compiled and nothing have chaged! I have done a clean and removed all strange config filed like *.ncb etc. Doesn't help. I have checked the time stamp on the files and re-saved them, doesn't help. My system clock is correct. I can't figure this out! Have tried almost evertything for 2 days. Now I almost ready to reinstall Visual Studio and if that doesn't work, reinstall Windows XP. Btw... It's only in one project that this strange compile bug happends. Not in my other VS projects. Thanks.
Advertisement
Try deleting your problem project's .ncb and .suo files before you take extreme measures. They will remake themselves, so don't worry.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Have you tried creating a new empty project, and adding your current project files back into it? A very rough guess is that it's something to do with your project settings.
my_life:          nop          jmp my_life
[ Keep track of your TDD cycle using "The Death Star" ] [ Verge Video Editor Support Forums ] [ Principles of Verg-o-nomics ] [ "t00t-orials" ]
Quote:Original post by Zeblar Nagrim
I have problem with visual studio.Net 2003. Every time i press the build button it rebuild the project, even if the project is already compiled and nothing have chaged!

Thanks.


I'm confused. You say it builds when you click build, even though it's already compiled. VC has done that for a while now. There is a difference between compiling and linking. Even if everything is compiled, when you click build - it's going to build your project.

Even if I'm mistaken, then I don't understand why this is even an issue. Why are you clicking the button if you don't want to build??
Quote:Original post by DesCr
Quote:Original post by Zeblar Nagrim
I have problem with visual studio.Net 2003. Every time i press the build button it rebuild the project, even if the project is already compiled and nothing have chaged!

Thanks.


I'm confused. You say it builds when you click build, even though it's already compiled. VC has done that for a while now. There is a difference between compiling and linking. Even if everything is compiled, when you click build - it's going to build your project.

Even if I'm mistaken, then I don't understand why this is even an issue. Why are you clicking the button if you don't want to build??


There's a difference between build and rebuild. At work, some of our projects take about 12-40 hours to build the whole application. Now, if I want to make a small change, such as a bug fix, I don't want to wait hours. I just want the one object to build. When you build with Visual Studio, it should only build the object files that have changed, not the whole application. And as far as solving this, if you've checked your system date, follow felisandria's advice.
I've noticed that in a few projects when I see if _WIN32 is defined before including any headers or anything and end it before including any headers, I had the exact same problem as you. I have no idea why it was that way, and it was a really weird error, but oh well, I'm glad I fixed it, heh. The only files affected where the ones that had checked the _WIN32 though, so good luck finding the problem, it took me a while to find..
Quote:Original post by felisandria
Try deleting your problem project's .ncb and .suo files before you take extreme measures. They will remake themselves, so don't worry.

-fel


I have already tried that. I work in a team with 3 other people and have removed the entire source folder and checked out it again from CVS. And the problem remain... It's VERY strange.
If the timestamp on any of your project files is less than your system date, visual studio will rebuild them. I guess they use this system because it is less expensive than checksumming the files or something.

I experienced this problem myself when a friend in finland sent me some source files from 10 hours in the future. (sounds funny huh? :) I have also experienced this problem when my comp shut down improperly in a power outage and my system clock was reset.

So, if it's because of an incorrect system time, just set your clock.
Otherwise, if your files have the wrong time download touch for windows here, stick it in your path and touch *.* in your source folder to fix all the dates.
Quote:Original post by Melekor
If the timestamp on any of your project files is less than your system date, visual studio will rebuild them. I guess they use this system because it is less expensive than checksumming the files or something.

I experienced this problem myself when a friend in finland sent me some source files from 10 hours in the future. (sounds funny huh? :) I have also experienced this problem when my comp shut down improperly in a power outage and my system clock was reset.

So, if it's because of an incorrect system time, just set your clock.
Otherwise, if your files have the wrong time download touch for windows here, stick it in your path and touch *.* in your source folder to fix all the dates.


Thanks Mekekor, I will try that.
check the solution/project settings... I think theres an option for incremental building/linking.

Or, in general, check all the settings - because some of them do disallow partial rebuilds.

I know I found such an optimization/setting a while back.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement