Can MSBuild be explicitly instructed that a partial incremental rebuild is possible for a target? -


i'm competent user of gnu make on unix, tasked writing build system using msbuild on windows 7. (cygwin not option)

the msbuild documentation on partial incremental builds states that:

msbuild attempts find 1-to-1 mapping between values of [the inputs , outputs attributes].

[...]

1-to-1 mappings typically produced item transformations.

if 1-to-1 mappings typically produced item transformations, there other ways in may produced?

the page contains following example target:

<target name="backup" inputs="@(compile)"      outputs="@(compile->'$(backupfolder)%(identity).bak')">     <copy sourcefiles="@(compile)" destinationfiles=         "@(compile->'$(backupfolder)%(identity).bak')" /> </target> 

it bothers me transformation @(compile) item set of .bak files duplicated. appears once in target's outputs attribute, , once in copy task's destinationfiles attribute.

i'd able specify transformation once, preferably declaring item backup files. might want use same item in other tasks , targets. example:

<itemgroup>     <backupfiles include="@(compile->'$(backupfolder)%(identity).bak')" /> </itemgroup>  <target name="backup" inputs="@(compile)" outputs="@(backupfiles)">     <copy sourcefiles="@(compile)" destinationfiles="@(backupfiles)" /> </target> 

then use @(backupfiles) outputs of target, destinationfiles of copy, , potentially elsewhere too. however, if partial incremental building stops happening. if all outputs date target correctly skipped, if some outputs out of date target run all inputs. appears 1-to-1 mapping between @(compile) , @(backupfiles) not identified when target run.

my questions are:

  1. can msbuild instructed 1-to-1 mapping exists between target's inputs , outputs attributes when has failed spot 1 itself, such @(compile) , @(backupfiles) above?

  2. is there equivalent make's $^, $< , $@ values. is; inputs , outputs of current target? in particular i'd use $@ destinationfiles of copy task. is; "whatever identified output; use that".

ps: have "using msbuild , team foundation build" book (2nd edition), if wishes refer it.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -