How to run a target when any of a set of input files has changed?
I'm trying to build a large project that msbuild does not understand via a <Target> with the inputs parameter as a list of all source files in that project and outputs as the single file the build produces. However, even when I change a file in the Inputs of the <Target> the target is not re-run. There is not a 1-1 mapping between inputs and outputs.
8 Replies
I added you to an email thread with my msbuild expert.
Hey Mike thanks received!
I've messed with it for a few hours and at this point I'm ready to bail and run a node script to it (:
Could not find any way to debug why a target did or did not run
msbuild /bl
binlog?
Then open the .binlog it produces with the binary log viewer
It should say why or why not each target ran.
Just search for your target name
Got it testing thx
@mtreit doesn't show up at all in the output. The only difference between this target and those that show up is this one doesn't have a BeforeTarget / AfterTarget property
If I change that I see it and some debug info on why it didn't run !
You might want to put it in the DefaultTargets for the project?
Or use AfterTargets.
It doesn't run all target by default I don't think.
I put it in beforebuild for now
beforeTargets=beforeBuild
This is the only thing being built in this .proj
I'll try default