Well Known Limitation: Dynamic items and properties not emitted until target execution completes

Sayed Ibrahim Hashimi has written about a restriction that he ran into when using CreateProperty and CreateItem tasks to dynamically emit properties and items.  The issue has to do with not being able to access items and properties that are created within a target until the target execution actually completes.

So, if you were to run CreateProperty or CreateItem and immediately execute the CallTarget task to invoke another target that needed access either an item or property that was just created, you will be out of luck.  We don't publish dynamic properties or items until the target that created them is done executing.  This is a known issue for Whidbey.  Fortunately the workaround is simple:  have one target emit the items/properties and finish execution before you run the next target that uses them.  You can sequence the execution of these two targets via a DependsOnTargets attribute on a master target - alternatively the master target can use CallTarget to invoke both the targets sequentially.

Thank you Sayed for reporting it via the MSDN Product Feedback Center.  We have it on our list of feature items to consider for Orcas, and we will need to either publish items and properties globally even before the target execution completes - or alternatively allow parameter passing into targets.

Feedback and blogging about these topics just gives us a better idea of the pain points our customers are experiencing today.  Thanks for the feedback and continue sending us more.

[ Author: Faisal Mohamood ]