Project Custom Build Setup, associated file?

G

Guest

In VS/VC 2003:

Simple question: for the Custom Build Step for the project (right click the
project in the Solution Explorer, select "Properties", select the "Custom
Build Step" in the "Configuration Properties" tree at the left, then select
"General" under "Custom Build Step"), what is the implicitly dependent file?

My situation is, there is a file I would like to copy after the build; but,
only if it has changed. I've added a "copy file destinationdir" to the
command line, added "destinationdir\file" to the outputs, and added "file" to
the additional dependencies. But, the custom build step is run every time,
even though my source file has the same date as the destination file (meaning
VS wants to build whenever I debug).

I don't want integrated revision control to pick this file up; so, I don't
want it as part of the project (i.e. adding "destinationdir\file" to my
project files is something I don't want to do).

I've monitored devenv.exe with Filemon and it does open "file" then
"destinationdir\file" before executing my command line; so, there must be
some other file Visual Studio is using as a dependency when deciding whether
the Custom Build command line needs to executed.
 
V

Vince Yuan

Hi peter,
You should use PostBuild event (Configuration properties->Build
Events->Post-build event).

I always create a BAT file and call this bat file in the Post-build event.
 
G

Guest

That performs the same functionality as Custom Build Step; except Post-build
Event doesn't have an "Additional Dependencies" property and an "Outputs"
Property that it ignores, like Custom Build Step.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top