Creating Code in an MSBuild Task

I create an MSBuild task that will generate one or more files, I have a Task with the [output] property, which is of type ITaskItem []. My question is: do I need to implement this interface myself or is there a class that I can use already?

I want them to be compiled task elements that are added to the list of files for compilation.

+3
source share
1 answer

Turns out there is already a TaskItem class. It is fairly general, but should work fine. If you set ItemName = "Compile" in the output element in your targets file, it will create them as compilation elements and add them to the collection. No problems

+2
source

All Articles