Sign in to follow this  
Black Knight

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

Recommended Posts

Black Knight    769
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?

Share this post


Link to post
Share on other sites
Palidine    1315
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

Share this post


Link to post
Share on other sites
Black Knight    769
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.

Share this post


Link to post
Share on other sites
Zahlman    1682
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?

Share this post


Link to post
Share on other sites
Black Knight    769
[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]

Share this post


Link to post
Share on other sites
OrangyTang    1298
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this