Closed xtmq closed 5 years ago
No, I don't think there's a general way to do this. We don't even have a good event in the engine for "an item was created" -- it's just logged as a message.
May I ask why you're interested in this? I would generally not expect it to be useful, as most processes and extenders would expect items injected via a new target/task to work as if they were produced by the normal process.
This time I'm looking for a way to distinct Compile
items from MarkupCompilePass1
from all other Compile
items.
But I have expected this answer to be honest. But was afraid that I miss some obvious thing... Thanks for the fast reply!
I build a project via MsBuild API, using
BuildManager
. So after a build I haveProjectInstance
object. Is it possible to understand whichProjectItemInstance
was produced bu which task (or target)?I know about
BuildResult.ResultsByTarget
but for some items there is no data there. For example forCompile
items fromMarkupCompilePass1
.The only was I found so far is pass a logger, specify
BuildParameters.LogTaskInputs = true
and parse log messages. But it is relatively slow =(Thanks in advance!