How to check if a project is up-to-date?

Started by
4 comments, last by OrangyTang 16 years, 9 months ago
I'm trying to write a macro for visual studio 2005 And i want to do some work if a project is being really build. I want to skip projects that are up-to-date. I tried implementing BuildEvents_OnBuildDone BuildEvents_OnBuildProjConfigBegin BuildEvents_OnBuildProjConfigDone But they are called always no matter the projects are up-to-date or not. Any help?
Advertisement
Could you be more clear what you mean by "skip projects that are up-to-date"? VS2005 will already not build projects that don't need to be rebuilt; it runs a full dependency check from touched files to figure out what needs to be built (ala 'make').

-me
HMm ok inside the macro there are build events that are fired BuildEvents_OnBuildDone
BuildEvents_OnBuildProjConfigBegin
BuildEvents_OnBuildProjConfigDone
like this.
So when I press F7 they are always fired even if the project is up to date.
I need to write to a text file some info when a project is really compiled but do nothing when it is up to date.
Quote:Original post by Black Knight
And i want to do some work if a project is being really build.


What kind of work?

Quote:I want to skip projects that are up-to-date.


Why?
[smile]
Ok When the project is really build I am incrementing a build number but if its up-to-date I will not increase that number because its already built before.
Currently it always increases the build number.I hope that makes sense [help]
If using source control you should be able to export the current transaction number from it at build time and use that. If you're not using source control then an abstract number is pointless and I'd go with the time of build instead. Both options avoid needing to only run the process when doing a "proper" build.

This topic is closed to new replies.

Advertisement