I have an MSBuild custom task that processes a collection of files and returns a modified subset of this. Basically, I just create a new ITaskItem array from the input, skipping some elements.
However, the RecursiveDir metadata disappears when this result set returns to MSBuild! It still contains the correct values โโat the end of my Execute () method, but when I try to use RecursiveDir in MSBuild, I find it empty! This is of course a problem!
What should I do? This is normal? Other metadata, such as file name and extension, still exist. Identity also indicates the correct file. I do not modify the metadata in any way in my custom task.
I have seen that other MSBuild task libraries also return ITaskItem arrays without any special handling. But no one has encountered this problem? Bizarre!
I am using MSBuild 3.5.
source share